]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Search filter groups admin UI / API
[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, 999) 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                 LEFT JOIN actor.usr_standing_penalty ausp 
5059                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5060                 LEFT JOIN config.standing_penalty csp
5061                         ON (
5062                                 csp.id = ausp.standing_penalty AND 
5063                                 csp.block_list LIKE '%CAPTURE%' AND (
5064                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5065                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5066                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5067                                         )
5068                                 )
5069                         )
5070                 LEFT JOIN serial.issuance siss
5071                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5072                 LEFT JOIN asset.copy_location_order acplo
5073                         ON (acp.location = acplo.location AND
5074                                 acp.circ_lib = acplo.org)
5075                 WHERE
5076                         ahr.capture_time IS NULL AND
5077                         ahr.cancel_time IS NULL AND
5078                         csp.id IS NULL AND
5079                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5080                 ]]></oils_persist:source_definition>
5081                 <fields oils_persist:primary="id">
5082                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5083                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5084                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5085                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5086                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5087                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5088                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5089                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5090                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5091                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5092                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5093                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5094                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5095                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5096                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5097                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5098                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5099                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5100                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5101                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5102                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5103                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5104                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5105                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5106                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5107                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5108                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5109                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5110                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5111                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5112                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5113                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5114                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5115                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5116                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5117                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5118                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5119                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5120                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5121                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5122                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5123                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5124                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5125                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5126                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5127                 </fields>
5128                 <links>
5129                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5130                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5131                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5132                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5133                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5134                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5135                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5136                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5137                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5138                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5139                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5140                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5141                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5142                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5143                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5144                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5145                 </links>
5146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5147                         <actions>
5148                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5149                         </actions>
5150                 </permacrud>
5151         </class>
5152         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5153                 <oils_persist:source_definition>
5154                         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)
5155                 </oils_persist:source_definition>
5156                 <fields oils_persist:primary="id">
5157                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5158                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5159                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5161                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5162                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5163                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5164                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5165                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5166                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5167                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5168                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5169                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5170                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5171                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5173                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5175                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5176                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5177                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5178                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5179                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5180                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5181                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5182                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5183                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5184                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5185                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5186                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5187                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5188                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5189                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5190                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5191                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5192                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5193                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5194                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5195                 </fields>
5196                 <links>
5197                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5198                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5199                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5200                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5201                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5202                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5203                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5204                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5205                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5206                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5207                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5208                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5209                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5210                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5211                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5212                 </links>
5213         </class>
5214
5215         <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">
5216                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5217                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5218                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5219                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5220                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5221                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5222                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5223                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5224                 </fields>
5225                 <links>
5226                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5227                 </links>
5228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5229                         <actions>
5230                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5231                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5232                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5233                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5234                         </actions>
5235                 </permacrud>
5236         </class>
5237         <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">
5238                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5239                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5240                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5241                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5242                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5243                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5244                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5245                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5246                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5247                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5248                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5249                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5250                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5251                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5252                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5253                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5254                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5255                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5256                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5257                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5258                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5259                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5260                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5261                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5262                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5263                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5264                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5265                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5266                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5267                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5268                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5269                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5270                 </fields>
5271                 <links>
5272                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5273                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5274                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5275                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5276                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5277                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5278                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5279                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5280                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5281                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5282                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5283                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5284                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5285                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5286                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5287                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5288                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5289                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5290                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5291                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5292                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5293                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5294                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5295                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5296                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5297                 </links>
5298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5299             <actions>
5300                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5301                 <retrieve />
5302                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5303                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5304             </actions>
5305         </permacrud>
5306         </class>
5307         <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">
5308                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5309                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5310                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5311                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5312                 </fields>
5313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5314                         <actions>
5315                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5316                                 <retrieve/>
5317                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5318                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5319                         </actions>
5320                 </permacrud>
5321         </class>
5322         <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">
5323                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5324                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5325                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5326                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5327                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5328                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5329                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5330                 </fields>
5331                 <links>
5332                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5333                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5334                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5335                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5336                 </links>
5337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5338                         <actions>
5339                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5340                                 <retrieve/>
5341                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5342                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5343                         </actions>
5344                 </permacrud>
5345         </class>
5346         <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">
5347                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5348                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5349                         <field name="btype" reporter:datatype="text"/>
5350                         <field name="id" reporter:datatype="id" />
5351                         <field name="name"  reporter:datatype="text"/>
5352                         <field name="description" reporter:datatype="text"/>
5353                         <field name="owner" reporter:datatype="link"/>
5354                         <field name="pub" reporter:datatype="bool"/>
5355                         <field name="create_time" reporter:datatype="timestamp" />
5356                 </fields>
5357                 <links>
5358                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5359                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5360                 </links>
5361         </class>
5362         <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">
5363                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5364                         <field name="id" reporter:datatype="id" />
5365                         <field name="bucket" reporter:datatype="link"/>
5366                         <field name="note" reporter:datatype="text" />
5367                 </fields>
5368                 <links>
5369                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5370                 </links>
5371         </class>
5372         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5373                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5374                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5375                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5376                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5377                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5378                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5379                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5380                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5381                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5382                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5383                 </fields>
5384                 <links>
5385                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5386                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5387                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5388                 </links>
5389         </class>
5390         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5391                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5392                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5393                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5394                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5395                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5396                 </fields>
5397                 <links>
5398                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5399                 </links>
5400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5401                         <actions>
5402                                 <retrieve permission="VIEW_USER">
5403                                         <context link="usr" field="home_ou" />
5404                                 </retrieve>
5405                         </actions>
5406                 </permacrud>
5407         </class>
5408     <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">
5409         <fields oils_persist:primary="field">
5410             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5411             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5412             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5413         </fields>
5414         <links/>
5415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5416             <actions>
5417                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5418                 <retrieve />
5419                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5420                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5421             </actions>
5422         </permacrud>
5423     </class>
5424         <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">
5425                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5426                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5427                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5428                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5429                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5430                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5431                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5432                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5433                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5434                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5435                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5436                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5437                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5438                 </fields>
5439                 <links>
5440                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5441                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5442                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5443                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5444                 </links>
5445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5446             <actions>
5447                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5448                 <retrieve />
5449                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5450                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5451             </actions>
5452         </permacrud>
5453         </class>
5454         <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">
5455                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5456                         <field name="field" reporter:datatype="link"/>
5457                         <field name="id" reporter:datatype="id" />
5458                         <field name="source" reporter:datatype="link"/>
5459                         <field name="value"  reporter:datatype="text"/>
5460                 </fields>
5461                 <links>
5462                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5463                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5464                 </links>
5465         </class>
5466         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5467                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5468                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5469                         <field name="btype" reporter:datatype="text"/>
5470                         <field name="id" reporter:datatype="id" />
5471                         <field name="name"  reporter:datatype="text"/>
5472                         <field name="description" reporter:datatype="text"/>
5473                         <field name="owner" reporter:datatype="link"/>
5474                         <field name="pub" reporter:datatype="bool"/>
5475                         <field name="create_time" reporter:datatype="timestamp" />
5476                 </fields>
5477                 <links>
5478                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5479                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5480                 </links>
5481         </class>
5482         <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">
5483                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5484                         <field name="id" reporter:datatype="id" />
5485                         <field name="bucket" reporter:datatype="link"/>
5486                         <field name="note" reporter:datatype="text" />
5487                 </fields>
5488                 <links>
5489                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5490                 </links>
5491         </class>
5492         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5493                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5494                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5495                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5496                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5497                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5498                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5499                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5500                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5501                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5502                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5503                 </fields>
5504                 <links>
5505                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5506                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5507                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5508                 </links>
5509         </class>
5510         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5511                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5512                         <field name="id" reporter:datatype="id" />
5513                         <field name="ind1" />
5514                         <field name="ind2" />
5515                         <field name="record" />
5516                         <field name="subfield" />
5517                         <field name="tag" />
5518                         <field name="value" />
5519                 </fields>
5520                 <links>
5521                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5522                 </links>
5523         </class>
5524         <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">
5525                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5526                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5527                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5528                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5529                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5530                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5531                 </fields>
5532                 <links>
5533                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5534                 </links>
5535         </class>
5536         <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">
5537                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5538                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5539                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5540                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5541                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5542                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5543                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5544                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5545                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5546                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5547                 </fields>
5548                 <links>
5549                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5550                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5551                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5552                 </links>
5553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5554             <actions>
5555                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5556                 <retrieve/>
5557                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5558                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5559             </actions>
5560         </permacrud>
5561         </class>
5562         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5563                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5564                         <field name="create_date" reporter:datatype="timestamp"/>
5565                         <field name="creator" reporter:datatype="link"/>
5566                         <field name="edit_date" reporter:datatype="timestamp"/>
5567                         <field name="editor" reporter:datatype="link"/>
5568                         <field name="id" reporter:datatype="id" />
5569                         <field name="pub" reporter:datatype="bool"/>
5570                         <field name="record" reporter:datatype="link"/>
5571                         <field name="value"  reporter:datatype="text"/>
5572                 </fields>
5573                 <links>
5574                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5575                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5576                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5577                 </links>
5578         </class>
5579         <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">
5580                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5581                         <field name="balance_owed" reporter:datatype="money" />
5582                         <field name="total_owed" reporter:datatype="money" />
5583                         <field name="total_paid" reporter:datatype="money" />
5584                         <field name="usr" reporter:datatype="link"/>
5585                 </fields>
5586                 <links>
5587                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5588                 </links>
5589         </class>
5590         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5591                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5592                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5593                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5594                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5595                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5596                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5597                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5598                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5599                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5600                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5601                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5602                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5603                 </fields>
5604                 <links>
5605                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5606                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5607                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5608                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5609                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5610                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5611                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5612                 </links>
5613         </class>
5614         <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">
5615                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5616                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5617                         <field name="quality" reporter:datatype="int" />
5618                         <field name="source" reporter:datatype="text"/>
5619                         <field name="transcendant" reporter:datatype="bool"/>
5620                         <field name="can_have_copies" reporter:datatype="bool"/>
5621                 </fields>
5622                 <links/>
5623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5624             <actions>
5625                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5626                 <retrieve/>
5627                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5628                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5629             </actions>
5630         </permacrud>
5631         </class>
5632         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5633                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5634                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5635                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5636                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5637                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5638                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5639                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5640                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5641                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5642                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5643                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5644                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5645                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5646                 </fields>
5647                 <links>
5648                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5649                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5650                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5651                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5652                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5653                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5654                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5655                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5656                 </links>
5657         </class>
5658         <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">
5659                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5660                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5661                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5662                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5663                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5664                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5665                 </fields>
5666                 <links>
5667                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5668                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5669                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5670                 </links>
5671         </class>
5672         <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">
5673                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5674                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5675                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5676                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5677                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5678                 </fields>
5679                 <links>
5680                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5681                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5682                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5683                 </links>
5684         </class>
5685         <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">
5686                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5687                         <field name="bucket" reporter:datatype="link"/>
5688                         <field name="id" reporter:datatype="id" />
5689                         <field name="target_user" reporter:datatype="link"/>
5690                         <field name="create_time" reporter:datatype="timestamp" />
5691                         <field name="pos" reporter:datatype="int" />
5692                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5693                 </fields>
5694                 <links>
5695                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5696                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5697             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5698                 </links>
5699         </class>
5700         <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">
5701                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5702                         <field name="id" reporter:datatype="id" />
5703                         <field name="item" reporter:datatype="link"/>
5704                         <field name="note" reporter:datatype="text" />
5705                 </fields>
5706                 <links>
5707                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5708                 </links>
5709         </class>
5710         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5711                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5712                         <field name="balance_owed" reporter:datatype="money" />
5713                         <field name="total_owed" reporter:datatype="money" />
5714                         <field name="total_paid" reporter:datatype="money" />
5715                         <field name="usr" reporter:datatype="link"/>
5716                 </fields>
5717                 <links>
5718                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5719                 </links>
5720         </class>
5721         <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">
5722                 <fields oils_persist:primary="code" oils_persist:sequence="">
5723                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5724                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5725                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5726                 </fields>
5727                 <links/>
5728         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5729             <actions>
5730                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5731                 <retrieve/>
5732                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5733                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5734             </actions>
5735         </permacrud>
5736         </class>
5737         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5738                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5739                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5740                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5741                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5742                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5743                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5744                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5745                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5746                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5747                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5748                 </fields>
5749                 <links>
5750                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5751                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5752                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5753                 </links>
5754         </class>
5755         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5756                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5757                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5758                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5759                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5760                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5761                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5762                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5763                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5764                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5765                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5766                 </fields>
5767                 <links>
5768                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5769                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5770                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5771                 </links>
5772         </class>
5773         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5774                 <fields oils_persist:primary="id" oils_persist:sequence="">
5775                         <field name="checkin_lib" reporter:datatype="link"/>
5776                         <field name="checkin_staff" reporter:datatype="link"/>
5777                         <field name="checkin_time" reporter:datatype="timestamp"/>
5778                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5779                         <field name="circ_staff" reporter:datatype="link"/>
5780                         <field name="desk_renewal" reporter:datatype="bool"/>
5781                         <field name="due_date" reporter:datatype="timestamp"/>
5782                         <field name="duration" reporter:datatype="interval"/>
5783                         <field name="duration_rule" reporter:datatype="link"/>
5784                         <field name="fine_interval" reporter:datatype="interval"/>
5785                         <field name="id" reporter:datatype="id" />
5786                         <field name="max_fine" reporter:datatype="money" />
5787                         <field name="max_fine_rule" reporter:datatype="link"/>
5788                         <field name="opac_renewal" reporter:datatype="bool"/>
5789                         <field name="phone_renewal" reporter:datatype="bool"/>
5790                         <field name="recurring_fine" reporter:datatype="money" />
5791                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5792                         <field name="renewal_remaining" reporter:datatype="int" />
5793             <field name="grace_period" reporter:datatype="interval" />
5794                         <field name="stop_fines" reporter:datatype="text"/>
5795                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5796                         <field name="target_copy" reporter:datatype="link"/>
5797                         <field name="usr" reporter:datatype="link"/>
5798                         <field name="xact_finish" reporter:datatype="timestamp" />
5799                         <field name="xact_start" reporter:datatype="timestamp" />
5800                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5801                 </fields>
5802                 <links>
5803                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5804                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5805                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5806                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5807                 </links>
5808         </class>
5809         <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">
5810                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5811                         <field name="field" reporter:datatype="link"/>
5812                         <field name="id" reporter:datatype="id" />
5813                         <field name="source" reporter:datatype="link"/>
5814                         <field name="value" reporter:datatype="text"/>
5815                 </fields>
5816                 <links>
5817                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5818                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5819                 </links>
5820         </class>
5821         <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">
5822                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5823                         <field name="high" reporter:datatype="money" />
5824                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5825                         <field name="low" reporter:datatype="money" />
5826                         <field name="name" reporter:datatype="text"/>
5827                         <field name="normal" reporter:datatype="money" />
5828                         <field name="recurrence_interval" reporter:datatype="interval"/>
5829             <field name="grace_period" reporter:datatype="interval" />
5830                 </fields>
5831                 <links/>
5832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5833             <actions>
5834                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5835                 <retrieve/>
5836                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5837                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5838             </actions>
5839         </permacrud>
5840         </class>
5841         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5842                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5843                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5844                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5845                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5846                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5847                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5848                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5849                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5850                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5851                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5852                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5853                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5854                 </fields>
5855                 <links>
5856                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5857                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5858                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5859                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5860                 </links>
5861         </class>
5862         <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">
5863                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5864                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5865                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5866                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5867                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5868                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5869                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5870                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5871                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5872                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5873                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5874                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5875                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5876                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5877                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5878                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5879                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5880                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5881                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5882                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5883                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5884                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5885                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5886                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5887                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5888                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5889                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5890                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5891                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5892                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5893                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5894                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5895                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5896                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5897                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5898                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5899                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5900                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5901                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5902                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5903                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5904                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5905                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5906                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5907                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5908                 </fields>
5909                 <links>
5910                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5911                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5912                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5913                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5914                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5915                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5916                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5917                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5918                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5919                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5920                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5921                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5922                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5923                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5924                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5925                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5926                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5927                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5928                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5929                 </links>
5930         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5931             <actions>
5932                 <create permission="CREATE_COPY">
5933                     <context link="call_number" field="owning_lib"/>
5934                 </create>
5935                 <retrieve/>
5936                 <update permission="UPDATE_COPY">
5937                     <context link="call_number" field="owning_lib"/>
5938                 </update>
5939                 <delete permission="DELETE_COPY">
5940                     <context link="call_number" field="owning_lib"/>
5941                 </delete>
5942             </actions>
5943         </permacrud>
5944         </class>
5945
5946         <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">
5947                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5948                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5949                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5950                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5951                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5952                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5953                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5954                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5955                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5956                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5957                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5958                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5959                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5960                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5961                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5962                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5963                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5964                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5965                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5966                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5967                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5968                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5969                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5970                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5971                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5972                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5973                 </fields>
5974                 <links>
5975                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5976                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5977                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5978                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5979                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5980                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5981                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5982                 </links>
5983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5984                         <actions>
5985                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5986                                 <retrieve />
5987                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5988                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5989                         </actions>
5990                 </permacrud>
5991         </class>
5992
5993         <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">
5994                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5995                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5996                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5997                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5998                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5999                 </fields>
6000                 <links/>
6001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6002             <actions>
6003                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6004                 <retrieve/>
6005                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6006                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6007             </actions>
6008         </permacrud>
6009         </class>
6010         <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">
6011                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6012                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6013                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6014                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6015                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6016                 </fields>
6017                 <links/>
6018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6019             <actions>
6020                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6021                 <retrieve/>
6022                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6023                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6024             </actions>
6025         </permacrud>
6026         </class>
6027         <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">
6028                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6029                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6030                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6031                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6032                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6033                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6034                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6035                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6036                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6037                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6038                 </fields>
6039                 <links>
6040                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6041                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6042                 </links>
6043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6044             <actions>
6045                 <create permission="CREATE_PERM" global_required="true"/>
6046                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6047                 <update permission="UPDATE_PERM" global_required="true"/>
6048                 <delete permission="DELETE_PERM" global_required="true"/>
6049             </actions>
6050         </permacrud>
6051         </class>
6052         <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">
6053                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6054                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6055                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6056                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6057                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6058                 </fields>
6059                 <links>
6060                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6061                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6062                 </links>
6063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6064             <actions>
6065                 <create permission="ADMIN_SURVEY">
6066                     <context link="question" jump="survey" field="owner"/>
6067                 </create>
6068                 <retrieve/>
6069                 <update permission="ADMIN_SURVEY">
6070                     <context link="question" jump="survey" field="owner"/>
6071                 </update>
6072                 <delete permission="ADMIN_SURVEY">
6073                     <context link="question" jump="survey" field="owner"/>
6074                 </delete>
6075             </actions>
6076         </permacrud>
6077         </class>
6078         <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">
6079                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6080                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6081                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6082                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6083                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6084                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6085                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6086                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6087                 </fields>
6088                 <links>
6089                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6090                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6091                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6092                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6093                 </links>
6094         </class>
6095         <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">
6096                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6097                         <field name="balance_owed" reporter:datatype="money" />
6098                         <field name="total_owed" reporter:datatype="money" />
6099                         <field name="total_paid" reporter:datatype="money" />
6100                         <field name="usr" reporter:datatype="link"/>
6101                 </fields>
6102                 <links>
6103                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6104                 </links>
6105         </class>
6106         <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">
6107                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6108                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6109                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6110                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6111                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6112                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6113                 </fields>
6114                 <links>
6115                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6116                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6117                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6118                 </links>
6119         </class>
6120         <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">
6121                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6122                         <field name="field" reporter:datatype="link"/>
6123                         <field name="id" reporter:datatype="id" />
6124                         <field name="source" reporter:datatype="link"/>
6125                         <field name="value" reporter:datatype="text"/>
6126                 </fields>
6127                 <links>
6128                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6129                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6130                 </links>
6131         </class>
6132         <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">
6133                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6134                         <field name="field" reporter:datatype="link"/>
6135                         <field name="id" reporter:datatype="id" />
6136                         <field name="source" reporter:datatype="link"/>
6137                         <field name="value" reporter:datatype="text"/>
6138                 </fields>
6139                 <links>
6140                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6141                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6142                 </links>
6143         </class>
6144         <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">
6145                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6146                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6147                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6148                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6149                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6150                 </fields>
6151                 <links>
6152                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6153                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6154                 </links>
6155         </class>
6156         <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">
6157                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6158                         <field name="depth" reporter:datatype="int" />
6159                         <field name="grantable" reporter:datatype="bool"/>
6160                         <field name="grp" reporter:datatype="link"/>
6161                         <field name="id" reporter:datatype="id" />
6162                         <field name="perm" reporter:datatype="link"/>
6163                 </fields>
6164                 <links>
6165                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6166                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6167                 </links>
6168         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6169             <actions>
6170                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6171                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6172                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6173                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6174             </actions>
6175         </permacrud>
6176         </class>
6177         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6178                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6179                         <field name="items" oils_persist:virtual="true" />
6180                         <field name="btype" reporter:datatype="text"/>
6181                         <field name="id" reporter:datatype="id" />
6182                         <field name="name" reporter:datatype="text"/>
6183                         <field name="description" reporter:datatype="text"/>
6184                         <field name="owner" reporter:datatype="link"/>
6185                         <field name="pub" reporter:datatype="bool"/>
6186                         <field name="create_time" reporter:datatype="timestamp" />
6187                 </fields>
6188                 <links>
6189                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6190                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6191                 </links>
6192         </class>
6193         <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">
6194                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6195                         <field name="id" reporter:datatype="id" />
6196                         <field name="bucket" reporter:datatype="link"/>
6197                         <field name="note" reporter:datatype="text" />
6198                 </fields>
6199                 <links>
6200                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6201                 </links>
6202         </class>
6203         <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">
6204                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6205                         <field name="id" reporter:datatype="int" />
6206                         <field name="usr" reporter:datatype="link"/>
6207                         <field name="work_ou" reporter:datatype="link"/>
6208                 </fields>
6209                 <links>
6210                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6211                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6212                 </links>
6213         </class>
6214         <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">
6215                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6216                         <field name="depth" reporter:datatype="int"/>
6217                         <field name="grantable" reporter:datatype="bool"/>
6218                         <field name="id" reporter:datatype="id" />
6219                         <field name="perm" reporter:datatype="link"/>
6220                         <field name="usr" reporter:datatype="link"/>
6221                 </fields>
6222                 <links>
6223                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6224                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6225                 </links>
6226         </class>
6227         <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">
6228                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6229                         <field name="object_id" reporter:datatype="text"/>
6230                         <field name="grantable" reporter:datatype="bool"/>
6231                         <field name="id" reporter:datatype="id" />
6232                         <field name="perm" reporter:datatype="link"/>
6233                         <field name="usr" reporter:datatype="link"/>
6234                         <field name="object_type" reporter:datatype="text"/>
6235                 </fields>
6236                 <links>
6237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6238                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6239                 </links>
6240         </class>
6241         <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">
6242                 <fields oils_persist:primary="id" oils_persist:sequence="">
6243                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6244                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6245                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6246                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6247                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6248                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6249                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6250                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6251                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6252                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6253                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6254                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6255                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6256                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6257                 </fields>
6258                 <links>
6259                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6260                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6261                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6262                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6263                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6264                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6265                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6266                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6267                 </links>
6268         </class>
6269         <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">
6270                 <fields oils_persist:primary="id" oils_persist:sequence="">
6271                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6272                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6273                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6274                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6275                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6276                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6277                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6278                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6279                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6280                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6281                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6282                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6283                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6284                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6285                 </fields>
6286                 <links>
6287                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6288                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6289                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6290                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6291                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6292                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6293                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6294                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6295                 </links>
6296         </class>
6297         <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">
6298                 <fields oils_persist:primary="id" oils_persist:sequence="">
6299                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6300                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6301                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6302                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6303                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6304                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6305                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6306                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6307                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6308                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6309                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6310                 </fields>
6311                 <links>
6312                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6313                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6314                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6315                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6316                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6317                 </links>
6318         </class>
6319         <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">
6320                 <fields oils_persist:primary="id" oils_persist:sequence="">
6321                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6322                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6323                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6324                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6325                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6326                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6327                         <field reporter:label="Accepting User" name="accepting_usr" />
6328                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6329                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6330                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6331                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6332                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6333                 </fields>
6334                 <links>
6335                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6336                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6337                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6338                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6339                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6340                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6341                 </links>
6342         </class>
6343         <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">
6344                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6345                         <field name="bucket" reporter:datatype="link"/>
6346                         <field name="id" reporter:datatype="id" />
6347                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6348                         <field name="create_time" reporter:datatype="timestamp" />
6349                         <field name="pos" reporter:datatype="int" />
6350                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6351                 </fields>
6352                 <links>
6353                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6354                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6355             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6356                 </links>
6357         </class>
6358         <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">
6359                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6360                         <field name="id" reporter:datatype="id" />
6361                         <field name="item" reporter:datatype="link"/>
6362                         <field name="note" reporter:datatype="text" />
6363                 </fields>
6364                 <links>
6365                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6366                 </links>
6367         </class>
6368         <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">
6369                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6370                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6371                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6372                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6373                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6374                 </fields>
6375                 <links>
6376                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6377                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6378                 </links>
6379         </class>
6380     <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">
6381         <fields oils_persist:primary="field">
6382             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6383             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6384             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6385         </fields>
6386         <links/>
6387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6388             <actions>
6389                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6390                 <retrieve />
6391                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6392                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6393             </actions>
6394         </permacrud>
6395     </class>
6396         <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">
6397                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6398                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6399                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6400                 </fields>
6401                 <links/>
6402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6403             <actions>
6404                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6405                 <retrieve/>
6406                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6407                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6408             </actions>
6409         </permacrud>
6410         </class>
6411
6412
6413         <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">
6414                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6415                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6416                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6417                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6418                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6419                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6420                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6421                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6422                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6423                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6424                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6425                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6426                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6427                 </fields>
6428                 <links>
6429                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6430                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6431                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6432                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6433                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6434                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6435                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6436                 </links>
6437         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6438             <actions>
6439                 <create permission="TRANSIT_COPY">
6440                     <context link="target_copy" field="owner"/>
6441                 </create>
6442                 <retrieve/>
6443                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6444                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6445             </actions>
6446         </permacrud>
6447         </class>
6448         <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">
6449                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6450                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6451                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6452                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6453                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6454                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6455                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6456                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6457                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6458                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6459                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6460                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6461                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6462                 </fields>
6463                 <links>
6464                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6465                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6466                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6467                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6468                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6469                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6470                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6471                 </links>
6472         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6473             <actions>
6474                 <create permission="TRANSIT_COPY" context_field="owner">
6475                     <context link="target_copy" field="circ_lib"/>
6476                 </create>
6477                 <retrieve/>
6478                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6479                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6480             </actions>
6481         </permacrud>
6482         </class>
6483         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6484                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6485                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6486                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6487                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6488                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6489                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6490                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6491                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6492                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6493                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6494                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6495                 </fields>
6496                 <links>
6497                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6498                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6499                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6500                 </links>
6501         </class>
6502         <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">
6503                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6504                         <field name="grp" />
6505                         <field name="id" reporter:datatype="id" />
6506                         <field name="usr" />
6507                 </fields>
6508                 <links>
6509                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6510                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6511                 </links>
6512         </class>
6513         <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">
6514                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6515                         <field name="id" reporter:datatype="id" />
6516                         <field name="fq_field" reporter:datatype="text"/>
6517                         <field name="identity_value" reporter:datatype="text"/>
6518                         <field name="translation" reporter:datatype="text"/>
6519                         <field name="string" reporter:datatype="text"/>
6520                 </fields>
6521                 <links>
6522                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6523                 </links>
6524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6525             <actions>
6526                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6527                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6528                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6529                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6530             </actions>
6531         </permacrud>
6532         </class>
6533         <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">
6534                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6535                         <field name="id" reporter:datatype="id" />
6536                         <field name="fm_class" reporter:datatype="text"/>
6537                         <field name="field" reporter:datatype="text"/>
6538                         <field name="owner" reporter:datatype="org_unit"/>
6539                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6540                 </fields>
6541                 <links>
6542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6543                 </links>
6544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6545             <actions>
6546                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6547                 <retrieve/>
6548                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6549                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6550             </actions>
6551         </permacrud>
6552         </class>
6553         <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">
6554                 <fields oils_persist:primary="code">
6555                         <field name="code" reporter:datatype="id" />
6556                         <field name="marc_code" reporter:datatype="text"/>
6557                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6558                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6559                 </fields>
6560                 <links/>
6561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6562             <actions>
6563                 <create permission="CREATE_LOCALE" global_required="true"/>
6564                 <retrieve/>
6565                 <update permission="UPDATE_LOCALE" global_required="true"/>
6566                 <delete permission="DELETE_LOCALE" global_required="true"/>
6567             </actions>
6568         </permacrud>
6569         </class>
6570         <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">
6571                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6572                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6573                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6574                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6575             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6576                 </fields>
6577                 <links>
6578                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6579                 </links>
6580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6581             <actions>
6582                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6583                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6584                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6585                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6586             </actions>
6587         </permacrud>
6588         </class>
6589
6590         <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">
6591                 <fields oils_persist:primary="id">
6592                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6593                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6594                 </fields>
6595                 <links/>
6596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6597             <actions>
6598                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6599                 <retrieve/>
6600                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6601                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6602             </actions>
6603         </permacrud>
6604         </class>
6605
6606         <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">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6608                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6609                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6610                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6611                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6612                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6613                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6614                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6615                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6616                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6617                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6618                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6619                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6620                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6621                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6622                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6623                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6624                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6625                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6626                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6627                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6628                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6629                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6630                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6631                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6632                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6633                 </fields>
6634                 <links>
6635                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6636                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6637                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6638                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6639                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6640                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6641                 </links>
6642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6643             <actions>
6644                 <create permission="user_request.create">
6645                     <context link="usr" field="home_ou"/>
6646                                 </create>
6647                 <retrieve permission="user_request.view">
6648                     <context link="usr" field="home_ou"/>
6649                                 </retrieve>
6650                 <update permission="user_request.update">
6651                     <context link="usr" field="home_ou"/>
6652                                 </update>
6653                 <delete permission="user_request.delete">
6654                     <context link="usr" field="home_ou"/>
6655                                 </delete>
6656             </actions>
6657         </permacrud>
6658         </class>
6659
6660         <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">
6661                 <fields oils_persist:primary="code">
6662                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6663                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6664                 </fields>
6665                 <links/>
6666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6667             <actions>
6668                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6669                 <retrieve/>
6670                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6671                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6672             </actions>
6673         </permacrud>
6674         </class>
6675
6676         <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">
6677                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6678                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6679                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6680                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6681                         <field reporter:label="Ratio" name="ratio" />
6682                 </fields>
6683                 <links>
6684                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6685                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6686                 </links>
6687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6688                         <actions>
6689                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6690                                 <retrieve/>
6691                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6692                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6693                         </actions>
6694                 </permacrud>
6695         </class>
6696
6697         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6698                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6699                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6700                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6701                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6702                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6703                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6704                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6705                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6706                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6707                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6708                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6709                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6710                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6711                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6712                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6713                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6714                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6715                 </fields>
6716                 <links>
6717                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6718                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6719             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6720             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6721             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6722                 </links>
6723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6724             <actions>
6725                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6726                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6727                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6728                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6729             </actions>
6730         </permacrud>
6731         </class>
6732
6733         <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">
6734                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6735                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6736                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6737                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6738                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6739                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6740                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6741                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6742                 </fields>
6743                 <links>
6744                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6745                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6746                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6747                 </links>
6748         </class>
6749
6750         <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">
6751                 <fields oils_persist:primary="code">
6752                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6753                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6754                 </fields>
6755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6756             <actions>
6757                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6758                 <retrieve/>
6759                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6760                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6761             </actions>
6762                 </permacrud>
6763         </class>
6764
6765         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6766                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6767                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6768                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6769                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6770                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6771                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6772                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6773                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6774                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6775                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6776                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6777                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6778                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6779                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6780                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6781                 </fields>
6782                 <links>
6783                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6784                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6785                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6786                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6787                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6788                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6789                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6790                 </links>
6791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6792             <actions>
6793                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6794                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6795                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6796                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6797             </actions>
6798         </permacrud>
6799         </class>
6800
6801         <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">
6802                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6803                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6804                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6805                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6806                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6807                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6808                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6809                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6810                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6811                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6812                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6813                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6814                 </fields>
6815                 <links>
6816                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6817                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6818                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6819                 </links>
6820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6821             <actions>
6822                 <create   permission="ADMIN_INVOICE">
6823                                         <context link="invoice" field="receiver"/>
6824                                 </create>
6825                 <retrieve permission="ADMIN_INVOICE">
6826                                         <context link="invoice" field="receiver"/>
6827                                 </retrieve>
6828                 <update   permission="ADMIN_INVOICE">
6829                                         <context link="invoice" field="receiver"/>
6830                                 </update>
6831                                 <delete   permission="ADMIN_INVOICE">
6832                                         <context link="invoice" field="receiver"/>
6833                                 </delete>
6834             </actions>
6835         </permacrud>
6836         </class>
6837
6838         <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">
6839                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6840                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6841                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6842                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6843                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6844                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6845                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6846                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6847                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6848                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6849                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6850                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6851                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6852                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6853                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6854                 </fields>
6855                 <links>
6856                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6857                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6858                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6859                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6860                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6861                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6862                 </links>
6863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6864             <actions>
6865                 <create   permission="ADMIN_INVOICE">
6866                                         <context link="invoice" field="receiver"/>
6867                                 </create>
6868                 <retrieve permission="ADMIN_INVOICE">
6869                                         <context link="invoice" field="receiver"/>
6870                                 </retrieve>
6871                 <update   permission="ADMIN_INVOICE">
6872                                         <context link="invoice" field="receiver"/>
6873                                 </update>
6874                                 <delete   permission="ADMIN_INVOICE">
6875                                         <context link="invoice" field="receiver"/>
6876                                 </delete>
6877             </actions>
6878         </permacrud>
6879         </class>
6880
6881         <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">
6882                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6883                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6884                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6885                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6886                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6887                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6888                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6889                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6890                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6891                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6892                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6893                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6894                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6895                 </fields>
6896                 <links>
6897                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6898                 </links>
6899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6900             <actions>
6901                 <create permission="ADMIN_PROVIDER">
6902                     <context link="provider" field="owner"/>
6903                 </create>
6904                 <retrieve permission="ADMIN_PROVIDER">
6905                     <context link="provider" field="owner"/>
6906                 </retrieve>
6907                 <update permission="ADMIN_PROVIDER">
6908                     <context link="provider" field="owner"/>
6909                 </update>
6910                 <delete permission="ADMIN_PROVIDER">
6911                     <context link="provider" field="owner"/>
6912                 </delete>
6913             </actions>
6914         </permacrud>
6915         </class>
6916
6917         <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">
6918                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6919                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6920                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6921                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6922                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6923                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6924                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6925         </fields>
6926                 <links>
6927                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6928                 </links>
6929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6930             <actions>
6931                 <create permission="ADMIN_PROVIDER">
6932                     <context link="provider" field="owner"/>
6933                 </create>
6934                 <retrieve permission="ADMIN_PROVIDER">
6935                     <context link="provider" field="owner"/>
6936                 </retrieve>
6937                 <update permission="ADMIN_PROVIDER">
6938                     <context link="provider" field="owner"/>
6939                 </update>
6940                 <delete permission="ADMIN_PROVIDER">
6941                     <context link="provider" field="owner"/>
6942                 </delete>
6943             </actions>
6944         </permacrud>
6945     </class>
6946         <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">
6947                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6948                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6949                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6950                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6951                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6952                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6953                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6954                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6955                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6956                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6957                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6958                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6959                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6960                 </fields>
6961                 <links>
6962                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6963                 </links>
6964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6965             <actions>
6966                 <create permission="ADMIN_PROVIDER">
6967                     <context link="contact" jump='provider' field="owner"/>
6968                 </create>
6969                 <retrieve permission="ADMIN_PROVIDER">
6970                     <context link="contact" jump='provider' field="owner"/>
6971                 </retrieve>
6972                 <update permission="ADMIN_PROVIDER">
6973                     <context link="contact" jump='provider' field="owner"/>
6974                 </update>
6975                 <delete permission="ADMIN_PROVIDER">
6976                     <context link="contact" jump='provider' field="owner"/>
6977                 </delete>
6978             </actions>
6979         </permacrud>
6980         </class>
6981
6982         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6984                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6985                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6986                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6987                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6988                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6989                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6990                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6991                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6992                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6993                 </fields>
6994                 <links>
6995                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6996                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6997                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6998                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6999                 </links>
7000         </class>
7001
7002         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
7003                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7004                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7005                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7006                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7007                 </fields>
7008                 <links>
7009             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7010                 </links>
7011                 <!--
7012                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
7013                         But here's what it should look like if we ever do use pcrud.
7014                 -->
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="ADMIN_ACQ_FISCAL_YEAR" 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" 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                 <!--
7037                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
7038                         But here's what it should look like if we ever do use pcrud.
7039                 -->
7040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7041                         <actions>
7042                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7043                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7044                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7045                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7046                         </actions>
7047                 </permacrud>
7048         </class>
7049
7050         <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">
7051                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7052                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7053                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7054                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7055                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7056                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7057                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7058                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7059                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7061                 </fields>
7062                 <links>
7063                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7064                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7065             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7066             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7067                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7068                 </links>
7069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7070             <actions>
7071                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7072                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7073                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7074                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7075             </actions>
7076         </permacrud>
7077         </class>
7078
7079         <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">
7080                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7081                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7082                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7083                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7084                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7085                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7086                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7087                 </fields>
7088                 <links>
7089                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7090                 </links>
7091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7092                         <actions>
7093                                 <create permission="ADMIN_FUNDING_SOURCE">
7094                     <context link="funding_source" field="owner"/>
7095                 </create>
7096                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7097                     <context link="funding_source" field="owner"/>
7098                 </retrieve>
7099                                 <update permission="ADMIN_FUNDING_SOURCE">
7100                     <context link="funding_source" field="owner"/>
7101                 </update>
7102                                 <delete permission="ADMIN_FUNDING_SOURCE">
7103                     <context link="funding_source" field="owner"/>
7104                 </delete>
7105                         </actions>
7106                 </permacrud>
7107         </class>
7108
7109         <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">
7110                 <fields oils_persist:primary="id">
7111                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7112                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7113                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7114                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7115                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7116                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7117                 </fields>
7118                 <links>
7119                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7120                 </links>
7121         </class>
7122
7123         <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">
7124                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7125                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7126                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7127                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7128                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7129                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7130                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7131                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7132                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7133                 </fields>
7134                 <links>
7135                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7136                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7137                 </links>
7138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7139                         <actions>
7140                                 <create permission="ADMIN_ACQ_FUND">
7141                     <context link="fund" field="org"/>
7142                 </create>
7143                                 <retrieve permission="ADMIN_ACQ_FUND">
7144                     <context link="fund" field="org"/>
7145                 </retrieve>
7146                                 <update permission="ADMIN_ACQ_FUND">
7147                     <context link="fund" field="org"/>
7148                 </update>
7149                                 <delete permission="ADMIN_ACQ_FUND">
7150                     <context link="fund" field="org"/>
7151                 </delete>
7152                         </actions>
7153                 </permacrud>
7154         </class>
7155
7156         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7157                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7158                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7159                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7160                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7161                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7162                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7163                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7164                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7165                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7166                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7167                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7168                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7169                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7170                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7171                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7172                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7173                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7174                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7175                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7176                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7177                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7178                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7179                 </fields>
7180                 <links>
7181                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7182                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7183             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7184             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7185             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7186             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7187             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7188             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7189             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7190             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7191             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7192                 </links>
7193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7194             <actions>
7195                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7196                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7197                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7198                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7199             </actions>
7200         </permacrud>
7201         </class>
7202
7203         <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">
7204                 <fields oils_persist:primary="fund">
7205                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7206                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7207                 </fields>
7208                 <links>
7209                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7210                 </links>
7211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7212             <actions>
7213                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7214                                         <context link="fund" field="org" />
7215                 </retrieve>
7216             </actions>
7217         </permacrud>
7218         </class>
7219
7220         <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">
7221                 <fields oils_persist:primary="fund">
7222                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7223                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7224                 </fields>
7225                 <links>
7226                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7227                 </links>
7228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7229             <actions>
7230                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7231                                         <context link="fund" field="org" />
7232                 </retrieve>
7233             </actions>
7234         </permacrud>
7235         </class>
7236
7237         <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">
7238                 <fields oils_persist:primary="fund">
7239                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7240                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7241                 </fields>
7242                 <links>
7243                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7244                 </links>
7245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7246             <actions>
7247                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7248                                         <context link="fund" field="org" />
7249                 </retrieve>
7250             </actions>
7251         </permacrud>
7252         </class>
7253
7254         <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">
7255                 <fields oils_persist:primary="fund">
7256                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7257                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7258                 </fields>
7259                 <links>
7260                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7261                 </links>
7262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7263             <actions>
7264                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7265                                         <context link="fund" field="org" />
7266                 </retrieve>
7267             </actions>
7268         </permacrud>
7269         </class>
7270
7271         <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">
7272                 <fields oils_persist:primary="fund">
7273                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7274                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7275                 </fields>
7276                 <links>
7277                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7278                 </links>
7279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7280             <actions>
7281                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7282                                         <context link="fund" field="org" />
7283                 </retrieve>
7284             </actions>
7285         </permacrud>
7286         </class>
7287
7288    <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">
7289         <fields oils_persist:primary="fund">
7290             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7291             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7292         </fields>
7293         <links>
7294             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7295         </links>
7296     </class>
7297
7298    <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">
7299         <fields oils_persist:primary="fund">
7300             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7301             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7302         </fields>
7303         <links>
7304             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7305         </links>
7306     </class>
7307
7308    <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">
7309         <fields oils_persist:primary="fund">
7310             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7311             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7312         </fields>
7313         <links>
7314             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7315         </links>
7316     </class>
7317
7318    <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">
7319         <fields oils_persist:primary="fund">
7320             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7321             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7322         </fields>
7323         <links>
7324             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7325         </links>
7326     </class>
7327
7328    <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">
7329         <fields oils_persist:primary="fund">
7330             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7331             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7332         </fields>
7333         <links>
7334             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7335         </links>
7336     </class>
7337
7338         <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">
7339                 <fields oils_persist:primary="funding_source">
7340                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7341                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7342                 </fields>
7343                 <links>
7344                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7345                 </links>
7346         </class>
7347
7348         <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">
7349                 <fields oils_persist:primary="funding_source">
7350                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7351                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7352                 </fields>
7353                 <links>
7354                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7355                 </links>
7356         </class>
7357
7358         <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">
7359                 <fields oils_persist:primary="funding_source">
7360                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7361                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7362                 </fields>
7363                 <links>
7364                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7365                 </links>
7366         </class>
7367
7368         <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">
7369                 <fields oils_persist:primary="fund">
7370                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7371                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7372                 </fields>
7373                 <links>
7374                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7375                 </links>
7376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7377             <actions>
7378                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7379                                         <context link="fund" field="org" />
7380                 </retrieve>
7381             </actions>
7382         </permacrud>
7383     </class>
7384     <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">
7385         <oils_persist:source_definition><![CDATA[
7386             SELECT
7387                 acqf.*,
7388                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7389                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7390                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7391                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7392             FROM
7393                 acq.fund acqf
7394                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7395                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7396                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7397                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7398         ]]></oils_persist:source_definition>
7399         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7400             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7401             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7402             <field reporter:label="Name" name="name" reporter:datatype="text" />
7403             <field reporter:label="Year" name="year" reporter:datatype="int" />
7404             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7405             <field reporter:label="Code" name="code" reporter:datatype="text" />
7406             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7407             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7408             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7409             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7410             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7411
7412             <!-- non fund-native fields -->
7413             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7414             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7415             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7416             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7417         </fields>
7418         <links>
7419             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7420             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7421             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7422         </links>
7423         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7424             <actions>
7425                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7426             </actions>
7427         </permacrud>
7428         </class>
7429         <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">
7430                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7431                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7432                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7433                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7434                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7435                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7436                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7437                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7438                 </fields>
7439                 <links>
7440                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7441                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7442                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7443                 </links>
7444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7445                         <actions>
7446                                 <create permission="ADMIN_ACQ_FUND">
7447                     <context link="fund" field="org"/>
7448                 </create>
7449                                 <retrieve permission="ADMIN_ACQ_FUND">
7450                     <context link="fund" field="org"/>
7451                 </retrieve>
7452                                 <update permission="ADMIN_ACQ_FUND">
7453                     <context link="fund" field="org"/>
7454                 </update>
7455                                 <delete permission="ADMIN_ACQ_FUND">
7456                     <context link="fund" field="org"/>
7457                 </delete>
7458                         </actions>
7459                 </permacrud>
7460         </class>
7461
7462     <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">
7463         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7464             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7465             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7466             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7467             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7468             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7469             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7470             <field reporter:label="Note" name="note" reporter:datatype="text" />
7471             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7472         </fields>
7473         <links>
7474             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7475             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7476             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7477         </links>
7478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7479                         <actions>
7480                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7481                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7482                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7483                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7484                         </actions>
7485                 </permacrud>
7486     </class>
7487
7488         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7489                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7490                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7491                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7492                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7493                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7494                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7495                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7496                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7497                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7498                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7499                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7500                 </fields>
7501                 <links>
7502                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7503                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7504                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7505                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7506                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7507                 </links>
7508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7509                         <actions>
7510                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7511                         </actions>
7512                 </permacrud>
7513         </class>
7514
7515         <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">
7516                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7517                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7518                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7519                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7520                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7521                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7522                 </fields>
7523                 <links>
7524                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7525                 </links>
7526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7527                         <actions>
7528                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7529                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7530                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7531                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7532                         </actions>
7533                 </permacrud>
7534         </class>
7535
7536         <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">
7537                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7538                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7539                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7540                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7541                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7542                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7543                         <field reporter:label="State" name="state" reporter:datatype="text" />
7544                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7545                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7546                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7547                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7548                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7549                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7550                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7551                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7552                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7553                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7554                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7555                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7556                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7557                 </fields>
7558                 <links>
7559                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7560                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7561                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7562                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7563                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7564                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7565                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7566                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7567                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7568                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7569                 </links>
7570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7571                         <actions>
7572                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7573                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7574                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7575                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7576                         </actions>
7577                 </permacrud>
7578         </class>
7579
7580         <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">
7581                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7582                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7583                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7584                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7585                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7586                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7587                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7588                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7589                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7590                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7591                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7592                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7593                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7594                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7595                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7596                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7597                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7598                 </fields>
7599                 <links>
7600                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7601                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7602                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7603                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7604                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7605                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7606                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7607                 </links>
7608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7609             <actions>
7610                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7611             </actions>
7612                 </permacrud>
7613         </class>
7614
7615         <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">
7616                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7617                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7618                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7619                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7620                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7621                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7622                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7623                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7624                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7625                 </fields>
7626                 <links>
7627                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7628                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7629                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7630                 </links>
7631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7632             <actions>
7633                 <create permission="CREATE_PURCHASE_ORDER">
7634                     <context link="purchase_order" field="ordering_agency"/>
7635                 </create>
7636                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7637                     <context link="purchase_order" field="ordering_agency"/>
7638                 </retrieve>
7639                 <update permission="CREATE_PURCHASE_ORDER">
7640                     <context link="purchase_order" field="ordering_agency"/>
7641                 </update>
7642                 <delete permission="CREATE_PURCHASE_ORDER">
7643                     <context link="purchase_order" field="ordering_agency"/>
7644                 </delete>
7645             </actions>
7646                 </permacrud>
7647         </class>
7648
7649         <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">
7650                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7651                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7652                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7653                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7654                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7655                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7656                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7657                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7658                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7659                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7660                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7661                 </fields>
7662                 <links>
7663                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7664                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7665                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7666                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7667                 </links>
7668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7669             <actions>
7670                 <create permission="CREATE_PURCHASE_ORDER">
7671                     <context link="purchase_order" field="ordering_agency"/>
7672                 </create>
7673                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7674                     <context link="purchase_order" field="ordering_agency"/>
7675                 </retrieve>
7676                 <update permission="CREATE_PURCHASE_ORDER">
7677                     <context link="purchase_order" field="ordering_agency"/>
7678                 </update>
7679                 <delete permission="CREATE_PURCHASE_ORDER">
7680                     <context link="purchase_order" field="ordering_agency"/>
7681                 </delete>
7682             </actions>
7683                 </permacrud>
7684         </class>
7685
7686         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7687                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7688                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7689                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7690                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7691                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7692                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7693                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7694                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7695                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7696                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7697                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7698                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7699                         <field reporter:label="State" name="state" reporter:datatype="text" />
7700                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7701                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7702                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7703                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7704                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7705                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7706                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7707                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7708                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7709                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7710                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7711                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7712                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7713                 </fields>
7714                 <links>
7715                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7716                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7717                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7718                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7719                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7720                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7721                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7722                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7723                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7724                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7725                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7726                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7727                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7728                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7729                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7730                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7731                 </links>
7732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7733                         <actions>
7734                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7735                                         <context link="purchase_order" field="ordering_agency"/>
7736                                         <context link="picklist" field="org_unit"/>
7737                                 </retrieve>
7738                         </actions>
7739                 </permacrud>
7740         </class>
7741
7742         <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">
7743                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7744                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7745                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7746                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7747                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7748                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7749                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7750                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7751                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7752                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7753                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7754                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7755                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7756                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7757                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7758                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7759                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7760                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7761                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7762                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7763                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7764                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7765                 </fields>
7766                 <links>
7767                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7768                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7769                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7770                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7771                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7772                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7773                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7774                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7775                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7776                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7777                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7778                 </links>
7779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7780                         <actions>
7781                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7782                                         <context link="purchase_order" field="ordering_agency"/>
7783                                         <context link="picklist" field="org_unit"/>
7784                                 </retrieve>
7785                         </actions>
7786                 </permacrud>
7787         </class>
7788
7789         <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">
7790                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7791                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7792                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7793                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7794                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7795                 </fields>
7796                 <links>
7797                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7798                 </links>
7799                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7800                         <actions>
7801                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7802                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7803                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7804                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7805                         </actions>
7806                 </permacrud>
7807         </class>
7808
7809         <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">
7810                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7811                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7812                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7813                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7814                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7815                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7816                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7817                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7818                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7819                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7820                 </fields>
7821                 <links>
7822                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7823                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7824                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7825                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7826                 </links>
7827         </class>
7828
7829         <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">
7830                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7831                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7832                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7833                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7834                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7835                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7836                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7837                 </fields>
7838                 <links>
7839                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7840                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7841                 </links>
7842         </class>
7843
7844         <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">
7845                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7846                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7847                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7848                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7849                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7850                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7851                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7852                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7853                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7854                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7855                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7856                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7857                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7858                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7859                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7860                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7861                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7862                 </fields>
7863                 <links>
7864                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7865                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7866                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7867                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7868                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7869                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7870                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7871                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7872                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7873                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7874                 </links>
7875         </class>
7876
7877         <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">
7878                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7879                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7880                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7881                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7882                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7883                 </fields>
7884                 <links/>
7885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7886                         <actions>
7887                                 <retrieve />
7888                         </actions>
7889                 </permacrud>
7890         </class>
7891
7892         <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">
7893                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7894                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7895                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7896                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7897                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7898                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7899             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7900                 </fields>
7901                 <links/>
7902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7903             <actions>
7904                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7905                 <retrieve />
7906                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7907                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7908             </actions>
7909         </permacrud>
7910         </class>
7911
7912         <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">
7913                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7914                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7915                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7916                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7917                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7918                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7919                 </fields>
7920                 <links/>
7921         </class>
7922         <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">
7923                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7924                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7925                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7926                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7927                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7928                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7929                 </fields>
7930                 <links>
7931                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7932                 </links>
7933         </class>
7934
7935         <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">
7936             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7937                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7938                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7939                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7940                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7941                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7942                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7943         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7944
7945             </fields>
7946             <links>
7947                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7948             </links>
7949             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7950                 <actions>
7951                     <create permission="ADMIN_PROVIDER">
7952                         <context link="provider" field="owner"/>
7953                     </create>
7954                     <retrieve permission="ADMIN_PROVIDER">
7955                         <context link="provider" field="owner"/>
7956                     </retrieve>
7957                     <update permission="ADMIN_PROVIDER">
7958                         <context link="provider" field="owner"/>
7959                     </update>
7960                     <delete permission="ADMIN_PROVIDER">
7961                         <context link="provider" field="owner"/>
7962                     </delete>
7963                 </actions>
7964             </permacrud>
7965         </class>
7966         
7967         <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">
7968             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7969                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7970                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7971                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7972                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7973             </fields>
7974             <links>
7975                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7976             </links>
7977             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7978                 <actions>
7979                     <create permission="ADMIN_PROVIDER">
7980                         <context link="provider" field="owner"/>
7981                     </create>
7982                     <retrieve permission="ADMIN_PROVIDER">
7983                         <context link="provider" field="owner"/>
7984                     </retrieve>
7985                     <update permission="ADMIN_PROVIDER">
7986                         <context link="provider" field="owner"/>
7987                     </update>
7988                     <delete permission="ADMIN_PROVIDER">
7989                         <context link="provider" field="owner"/>
7990                     </delete>
7991                 </actions>
7992             </permacrud>
7993         </class>
7994         
7995         <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">
7996             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7997                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7998                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7999                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8000                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8001                 </fields>
8002                 <links/>
8003         </class>
8004
8005         <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">
8006                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8007                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8008                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8009                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8010                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8011                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8012                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8013                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8014                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8015                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8016                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8017                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8018                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8019                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8020                 </fields>
8021                 <links>
8022                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8023                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8024                 </links>
8025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8026             <actions>
8027                 <create permission="ADMIN_PROVIDER">
8028                     <context link="provider" field="owner"/>
8029                 </create>
8030                 <retrieve permission="ADMIN_PROVIDER">
8031                     <context link="provider" field="owner"/>
8032                 </retrieve>
8033                 <update permission="ADMIN_PROVIDER">
8034                     <context link="provider" field="owner"/>
8035                 </update>
8036                 <delete permission="ADMIN_PROVIDER">
8037                     <context link="provider" field="owner"/>
8038                 </delete>
8039             </actions>
8040         </permacrud>
8041         </class>
8042
8043         <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">
8044                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8045                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8046                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8047                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8048                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8049                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8050                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8051                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8052                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8053                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8054                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8055                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8056                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8057                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8058                 </fields>
8059                 <links>
8060                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8061                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8062                 </links>
8063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8064             <actions>
8065                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8066                     <context link="account" jump="provider" field="owner"/>
8067                 </retrieve>
8068                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8069                     <context link="account" jump="provider" field="owner"/>
8070                 </update>
8071                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8072                     <context link="account" jump="provider" field="owner"/>
8073                 </delete>
8074             </actions>
8075         </permacrud>
8076         </class>
8077
8078
8079         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8080                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8081                         <field name="id" reporter:datatype="id" />
8082                         <field name="parent" reporter:datatype="link"/>
8083                         <field name="owner" reporter:datatype="link"/>
8084                         <field name="create_time" reporter:datatype="timestamp"/>
8085                         <field name="name" reporter:datatype="text"/>
8086                         <field name="shared" reporter:datatype="bool"/>
8087                         <field name="share_with" reporter:datatype="link"/>
8088                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8089                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8090                 </fields>
8091                 <links>
8092                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8093                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8094                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8095                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8096                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8097                 </links>
8098         </class>
8099         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8100                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8101                         <field name="id" reporter:datatype="id" />
8102                         <field name="parent" reporter:datatype="link"/>
8103                         <field name="owner" reporter:datatype="link"/>
8104                         <field name="create_time" reporter:datatype="timestamp"/>
8105                         <field name="name" reporter:datatype="text"/>
8106                         <field name="shared" reporter:datatype="bool"/>
8107                         <field name="share_with" reporter:datatype="link"/>
8108                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8109                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8110                 </fields>
8111                 <links>
8112                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8113                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8114                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8115                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8116                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8117                 </links>
8118         </class>
8119         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8120                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8121                         <field name="id" reporter:datatype="id" />
8122                         <field name="parent" reporter:datatype="link"/>
8123                         <field name="owner" reporter:datatype="link"/>
8124                         <field name="create_time" reporter:datatype="timestamp"/>
8125                         <field name="name" reporter:datatype="text"/>
8126                         <field name="shared" reporter:datatype="bool"/>
8127                         <field name="share_with" reporter:datatype="link"/>
8128                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8129                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8130                 </fields>
8131                 <links>
8132                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8133                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8134                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8135                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8136                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8137                 </links>
8138         </class>
8139         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8140                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8141                         <field name="id" reporter:datatype="id" />
8142                         <field name="owner" reporter:datatype="link"/>
8143                         <field name="create_time" reporter:datatype="timestamp"/>
8144                         <field name="name" reporter:datatype="text"/>
8145                         <field name="data" reporter:datatype="text"/>
8146                         <field name="folder" reporter:datatype="link"/>
8147                         <field name="description" reporter:datatype="text"/>
8148                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8149                 </fields>
8150                 <links>
8151                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8152                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8153                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8154                 </links>
8155         </class>
8156         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8157                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8158                         <field name="id" reporter:datatype="id" />
8159                         <field name="owner" reporter:datatype="link"/>
8160                         <field name="create_time" reporter:datatype="timestamp"/>
8161                         <field name="template" reporter:datatype="link"/>
8162                         <field name="data" reporter:datatype="text"/>
8163                         <field name="folder" reporter:datatype="link"/>
8164                         <field name="recur" reporter:datatype="bool"/>
8165                         <field name="recurrence" reporter:datatype="interval"/>
8166                         <field name="name" reporter:datatype="text"/>
8167                         <field name="description" reporter:datatype="text"/>
8168                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8169                 </fields>
8170                 <links>
8171                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8172                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8173                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8174                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8175                 </links>
8176         </class>
8177         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8178                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8179                         <field name="id" reporter:datatype="id" />
8180                         <field name="runner" reporter:datatype="link"/>
8181                         <field name="start_time" reporter:datatype="timestamp"/>
8182                         <field name="complete_time" reporter:datatype="timestamp"/>
8183                         <field name="run_time" reporter:datatype="timestamp"/>
8184                         <field name="email" reporter:datatype="text"/>
8185                         <field name="excel_format" reporter:datatype="bool"/>
8186                         <field name="csv_format" reporter:datatype="bool"/>
8187                         <field name="html_format" reporter:datatype="bool"/>
8188                         <field name="error_code" reporter:datatype="int"/>
8189                         <field name="error_text" reporter:datatype="text"/>
8190                         <field name="report" reporter:datatype="link"/>
8191                         <field name="folder" reporter:datatype="link"/>
8192                         <field name="chart_pie" reporter:datatype="bool"/>
8193                         <field name="chart_bar" reporter:datatype="bool"/>
8194                         <field name="chart_line" reporter:datatype="bool"/>
8195                 </fields>
8196                 <links>
8197                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8198                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8199                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8200                 </links>
8201         </class>
8202         <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">
8203                 <fields oils_persist:primary="id">
8204                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8205                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8206                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8207                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8208                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8209                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8210                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8211                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8212                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8213                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8214                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8215                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8216                 </fields>
8217                 <links>
8218                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8219                 </links>
8220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8221                         <actions>
8222                                 <retrieve />
8223                         </actions>
8224                 </permacrud>
8225         </class>
8226         <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">
8227                 <fields oils_persist:primary="id">
8228                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8229                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8230                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8231                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8232                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8233                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8234                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8235                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8236                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8237                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8238                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8239                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8240                 </fields>
8241                 <links>
8242                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8243                 </links>
8244         </class>
8245         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8246                 <fields oils_persist:primary="id">
8247                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8248                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8249                         <field reporter:label="Fingerprint" name="fingerprint" />
8250                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8251                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8252                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8253                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8254                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8255                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8256                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8257                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8258                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8259                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8260                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8261                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8262                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8263                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8264                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8265                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8266                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8267                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8268                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8269                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8270                 </fields>
8271                 <links>
8272                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8273                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8274                 </links>
8275         </class>
8276         <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">
8277                 <fields oils_persist:primary="id">
8278                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8279                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8280                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8281                 </fields>
8282                 <links>
8283                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8284                 </links>
8285         </class>
8286         <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">
8287                 <fields oils_persist:primary="id">
8288                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8289                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8290                 </fields>
8291                 <links>
8292                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8293                 </links>
8294         </class>
8295         <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">
8296                 <fields oils_persist:primary="id">
8297                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8298                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8299                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8300                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8301                 </fields>
8302                 <links>
8303                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8304                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8305                 </links>
8306         </class>
8307         <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">
8308                 <fields oils_persist:primary="xact">
8309                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8310                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8311                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8312                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8313                 </fields>
8314                 <links>
8315                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8316                 </links>
8317         </class>
8318         <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">
8319                 <fields oils_persist:primary="xact">
8320                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8321                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8322                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8323                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8324                 </fields>
8325                 <links>
8326                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8327                 </links>
8328         </class>
8329         <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)">
8330                 <fields oils_persist:primary="id">
8331                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8332                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8333                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8334                 </fields>
8335                 <links>
8336                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8337                 </links>
8338         </class>
8339         <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">
8340                 <fields oils_persist:primary="id">
8341                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8342                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8343                 </fields>
8344                 <links>
8345                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8346                 </links>
8347         </class>
8348         <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">
8349                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8350                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
8351                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8352                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8353                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8354                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8355                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8356                 </fields>
8357                 <links>
8358                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8359                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8360                 </links>
8361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8362                         <actions>
8363                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8364                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8365                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8366                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8367                         </actions>
8368                 </permacrud>
8369         </class>
8370         <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">
8371                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8372                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8373                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8374                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8375                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8376                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8377                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8378                 </fields>
8379                 <links>
8380                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8381                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8382                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8383                 </links>
8384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8385                         <actions>
8386                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8387                                         <context link="formula" field="owner"/>
8388                                 </create>
8389                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8390                                         <context link="formula" field="owner"/>
8391                                 </retrieve>
8392                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8393                                         <context link="formula" field="owner"/>
8394                                 </update>
8395                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8396                                         <context link="formula" field="owner"/>
8397                                 </delete>
8398                         </actions>
8399                 </permacrud>
8400         </class>
8401
8402         <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">
8403                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8404                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8405                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8406                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8407                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8408                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8409                 </fields>
8410                 <links>
8411                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8412                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8413                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8414                 </links>
8415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8416                         <actions>
8417                                 <create permission="CREATE_PURCHASE_ORDER">
8418                                         <context link="formula" field="owner"/>
8419                 </create>
8420                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8421                                         <context link="formula" field="owner"/>
8422                 </retrieve>
8423                                 <update permission="CREATE_PURCHASE_ORDER">
8424                                         <context link="formula" field="owner"/>
8425                 </update>
8426                                 <delete permission="CREATE_PURCHASE_ORDER">
8427                                         <context link="formula" field="owner"/>
8428                 </delete>
8429                         </actions>
8430                 </permacrud>
8431         </class>
8432
8433         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8434                 <fields oils_persist:primary="id">
8435                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8436                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8437                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8438                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8439                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8440                 </fields>
8441                 <links>
8442                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8443                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8444                 </links>
8445         </class>
8446
8447         <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">
8448                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8449                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8450                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8451                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8452                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8453                 </fields>
8454                 <links>
8455                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8456                 </links>
8457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8458                         <actions>
8459                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8460                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8461                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8462                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8463                         </actions>
8464                 </permacrud>
8465         </class>
8466
8467         <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">
8468                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8469                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8470                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8471                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8472                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8473                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8474                 </fields>
8475                 <links>
8476                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8477                 </links>
8478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8479                         <actions>
8480                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8481                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8482                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8483                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8484                         </actions>
8485                 </permacrud>
8486         </class>
8487
8488         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8489                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8490                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8491                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8492                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8493                 </fields>
8494                 <links>
8495                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8496                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8497                 </links>
8498         </class>
8499
8500         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8502                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8503                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8504                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8505                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8506                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8507                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8508                 </fields>
8509                 <links>
8510                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8511                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8512                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8513                 </links>
8514         </class>
8515
8516         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8517                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8518                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8519                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8520                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8521                 </fields>
8522                 <links>
8523                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8524                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8525                 </links>
8526         </class>
8527
8528         <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">
8529                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8530                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8531                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8532                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8533                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8534                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8535                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8536                 </fields>
8537                 <links>
8538                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8539                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8540                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8541                 </links>
8542         </class>
8543
8544         <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">
8545                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8546                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8547                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8548                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8549                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8550                 </fields>
8551                 <links>
8552                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8553                 </links>
8554                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8555             <actions>
8556                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8557                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8558                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8559                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8560             </actions>
8561                 </permacrud>
8562         </class>
8563
8564         <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">
8565                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8566                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8567                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8568                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8569                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8570                 </fields>
8571                 <links>
8572                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8573                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8574                 </links>
8575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8576                         <actions>
8577                                 <create permission="ADMIN_CLAIM_POLICY">
8578                                         <context link="claim_policy" field="org_unit"/>
8579                 </create>
8580                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8581                                         <context link="claim_policy" field="org_unit"/>
8582                 </retrieve>
8583                                 <update permission="ADMIN_CLAIM_POLICY">
8584                                         <context link="claim_policy" field="org_unit"/>
8585                 </update>
8586                                 <delete permission="ADMIN_CLAIM_POLICY">
8587                                         <context link="claim_policy" field="org_unit"/>
8588                 </delete>
8589                         </actions>
8590                 </permacrud>
8591         </class>
8592
8593     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8594         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8595             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8596             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8597             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8598             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8599             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8600             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8601             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8602             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8603             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8604             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8605             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8606             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8607             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8608             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8609             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8610         </fields>
8611     </class>
8612
8613     <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">
8614         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8615             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8616             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8617             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8618             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8619             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8620         </fields>
8621     </class>
8622
8623     <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">
8624         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8625             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8626             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8627             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8628             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8629             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8630             <field reporter:label="City" name="city" reporter:datatype="text"/>
8631             <field reporter:label="State" name="state" reporter:datatype="text"/>
8632             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8633             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8634             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8635         </fields>
8636     </class>
8637
8638     <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">
8639         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8640             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8641             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8642             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8643             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8644             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8645             <field reporter:label="City" name="city" reporter:datatype="text"/>
8646             <field reporter:label="State" name="state" reporter:datatype="text"/>
8647             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8648             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8649             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8650         </fields>
8651     </class>
8652
8653     <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">
8654         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8655             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8656             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8657             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8658             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8659             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8660             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8661         </fields>
8662     </class>
8663
8664         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8665                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8666                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8667                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8668                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8669                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8670                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8671                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8672                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8673                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8674                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8675                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8676                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8677                 </fields>
8678                 <links>
8679                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8680                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8681                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8682                 </links>
8683         </class>
8684
8685         <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">
8686                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8687                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8688                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8689                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8690                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8691                 </fields>
8692                 <links>
8693                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8694                 </links>
8695         </class>
8696
8697     <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">
8698         <fields>
8699             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8700             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8701             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8702         </fields>
8703                 <links>
8704                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8705                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8706                 </links>
8707     </class>
8708
8709     <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">
8710         <fields>
8711             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8712             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8713         </fields>
8714                 <links>
8715                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8716                 </links>
8717     </class>
8718
8719     <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">
8720         <fields>
8721             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8722             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8723             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8724         </fields>
8725                 <links>
8726                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8727                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8728                 </links>
8729     </class>
8730
8731     <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">
8732         <fields>
8733             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8734             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8735         </fields>
8736                 <links>
8737                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8738                 </links>
8739     </class>
8740
8741     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8742                 <oils_persist:source_definition>
8743
8744             SELECT  DISTINCT l.*
8745               FROM  action.unfulfilled_hold_loops l
8746                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8747               WHERE l.count = m.max
8748
8749                 </oils_persist:source_definition>
8750         <fields>
8751             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8752             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8753             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8754         </fields>
8755                 <links>
8756                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8757                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8758                 </links>
8759     </class>
8760
8761         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8762                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8763                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8764                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8765                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8766                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8767                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8768                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8769                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8770                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8771                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8772                 </fields>
8773                 <links>
8774                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8775                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8776                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8777                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8778                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8779                 </links>
8780         </class>
8781
8782         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8783                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8784                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8785                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8786                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8787                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8788                 </fields>
8789                 <links>
8790                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8791                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8792                 </links>
8793         </class>
8794
8795         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8796                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8797                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8798                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8799                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8800                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8801                 </fields>
8802                 <links>
8803                 </links>
8804         </class>
8805
8806         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8807                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8808                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8809                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8810                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8811                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8812                 </fields>
8813                 <links>
8814                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8815                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8816                 </links>
8817         </class>
8818         
8819         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8820                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8821                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8822                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8823                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8824                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8825                 </fields>
8826                 <links>
8827                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8828                 </links>
8829         </class>
8830         
8831         <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">
8832                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8833                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8834                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8835                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8836                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8837                 </fields>
8838                 <links>
8839                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8840                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8841                 </links>
8842         </class>
8843
8844         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8845                 <fields oils_persist:primary="name">
8846                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8847                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8848                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8849                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8850                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8851                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8852                 </fields>
8853                 <links>
8854                 </links>
8855         </class>
8856
8857         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8858                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8859                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8860                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8861                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8862                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8863                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8864                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8865                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8866                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8867                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8868                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8869                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8870                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8871                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8872                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8873                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8874                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8875                 </fields>
8876                 <links>
8877                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8878                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8879                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8880                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8881                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8882                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8883                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8884                 </links>
8885         </class>
8886
8887         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8888                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8889                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8890                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8891                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8892                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8893                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8894                 </fields>
8895                 <links>
8896                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8897                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8898                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8899                 </links>
8900         </class>
8901
8902         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8903                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8904                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8905                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8906                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8907                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8908                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8909                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8910                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8911                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8912                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8913                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8914                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8915                 </fields>
8916                 <links>
8917                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8918                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8919                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8920                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8921                 </links>
8922         </class>
8923
8924         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8925                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8926                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8927                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8928                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8929                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8930                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8931                 </fields>
8932                 <links>
8933                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8934                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8935                 </links>
8936         </class>
8937
8938         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8939                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8940                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8941                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8942                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8943                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8944                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8945                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8946                 </fields>
8947                 <links>
8948                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8949                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8950                 </links>
8951         </class>
8952
8953         <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">
8954                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8955                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8956                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8957                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8958                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8959                 </fields>
8960                 <links>
8961                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8962                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8963                 </links>
8964         </class>
8965
8966         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8967                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8968                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8969                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8970                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8971                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8972                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8973                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8974                 </fields>
8975                 <links>
8976                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8977                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8978                 </links>
8979         </class>
8980
8981         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8982                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8983                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8984                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8985                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8986                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8987                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8988                 </fields>
8989                 <links>
8990                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8991                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8992                 </links>
8993         </class>
8994
8995         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8996                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8997                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8998                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8999                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9000                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9001                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9002                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9003                 </fields>
9004                 <links>
9005                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9006                 </links>
9007         </class>
9008
9009         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9010                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9011                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9012                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9013                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9014                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9015                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9016                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9017                 </fields>
9018                 <links>
9019                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9020                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9021                 </links>
9022         </class>
9023
9024         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9025                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9026                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9027                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9028                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9029                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9030                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9031                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9032                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9033                 </fields>
9034                 <links>
9035                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9036                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9037                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9038                 </links>
9039         </class>
9040
9041         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9042                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9043                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9044                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9045                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9046                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9047                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9048                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9049                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9050                 </fields>
9051                 <links>
9052                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9053                 </links>
9054         </class>
9055
9056         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9057                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9058                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9059                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9060                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9061                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9062                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9063                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9064                 </fields>
9065                 <links>
9066                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9067                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9068                 </links>
9069         </class>
9070
9071         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9072                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9073                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9074                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9075                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9076                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9077                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9078                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9079                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9080                 </fields>
9081                 <links>
9082                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9083                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9084                 </links>
9085         </class>
9086
9087         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9088                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9089                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9090                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9091                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9092                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9093                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9094                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9095                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9096                 </fields>
9097                 <links>
9098                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9099                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9100                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9101                 </links>
9102         </class>
9103
9104         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9105                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9106                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9107                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9108                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9109                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9110                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9111                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9112                 </fields>
9113                 <links>
9114                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9115                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9116                 </links>
9117         </class>
9118
9119         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9120                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9121                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9122                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9123                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9124                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9125                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9126                 </fields>
9127                 <links>
9128                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9129                 </links>
9130         </class>
9131
9132         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9133                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9134                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9135                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9136                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9137                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9138                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9139                 </fields>
9140                 <links>
9141                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9142                 </links>
9143         </class>
9144
9145         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9146                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9147                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9148                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9149                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9150                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9151                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9152                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9153                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9154                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9155                 </fields>
9156                 <links>
9157                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9158                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9159                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9160                 </links>
9161         </class>
9162
9163         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9164                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9165                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9166                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9167                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9168                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9169                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9170                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9171                 </fields>
9172                 <links>
9173                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9174                 </links>
9175         </class>
9176
9177         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9178                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9179                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9180                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9181                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9182                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9183                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9184                 </fields>
9185                 <links>
9186                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9187                 </links>
9188         </class>
9189
9190         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9191                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9192                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9193                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9194                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9195                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9196                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9197                 </fields>
9198                 <links>
9199                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9200                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9201                 </links>
9202         </class>
9203
9204         <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">
9205                 <fields oils_persist:primary="id">
9206                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9207                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9208                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9209                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9210                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9211                 </fields>
9212                 <links>
9213                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9214                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9215                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9216                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9217                 </links>
9218         </class>
9219
9220         <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">
9221                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9222                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9223                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9224                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9225                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9226                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9227                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9228                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9229                 </fields>
9230                 <links/>
9231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9232                         <actions>
9233                                 <retrieve/>
9234                         </actions>
9235                 </permacrud>
9236         </class>
9237
9238         <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">
9239                 <fields oils_persist:primary="ptype_key">
9240                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9241                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9242                 </fields>
9243                 <links/>
9244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9245                         <actions>
9246                                 <retrieve/>
9247                         </actions>
9248                 </permacrud>
9249         </class>
9250
9251         <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">
9252                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9253                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9254                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9255                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9256                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9257                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9258                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9259                 </fields>
9260                 <links>
9261                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9262                 </links>
9263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9264                         <actions>
9265                                 <retrieve/>
9266                         </actions>
9267                 </permacrud>
9268         </class>
9269
9270         <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">
9271                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9272                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9273                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9274                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9275                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9276                 </fields>
9277                 <links>
9278                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9279                 </links>
9280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9281                         <actions>
9282                                 <retrieve/>
9283                         </actions>
9284                 </permacrud>
9285         </class>
9286
9287         <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">
9288                 <fields oils_persist:primary="code">
9289                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9290                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9291                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9292                 </fields>
9293                 <links/>
9294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9295                         <actions>
9296                                 <retrieve/>
9297                         </actions>
9298                 </permacrud>
9299         </class>
9300
9301         <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">
9302                 <oils_persist:source_definition>
9303
9304             SELECT  b.id,
9305                     MAX(dcp.edit_date) AS last_delete_date
9306              FROM   biblio.record_entry b
9307                     JOIN asset.call_number cn ON (cn.record = b.id)
9308                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9309              WHERE  NOT b.deleted
9310              GROUP BY b.id
9311              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9312
9313                 </oils_persist:source_definition>
9314                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9315                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9316                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9317                 </fields>
9318                 <links>
9319                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9320                 </links>
9321                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9322                         <actions>
9323                                 <retrieve/>
9324                         </actions>
9325                 </permacrud>
9326         </class>
9327
9328         <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">
9329                 <oils_persist:source_definition>
9330
9331             -- -- 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.
9332             -- -- 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
9333             -- -- may not.
9334             -- SELECT
9335             --     bre.id AS "bib_id",
9336             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9337             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9338             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9339             -- FROM (
9340                 SELECT
9341                     y.bre AS "id",
9342                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9343                     y.hold_count AS "hold_count",
9344                     (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"
9345                 FROM (
9346                         SELECT
9347                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9348                             COUNT(*) AS "hold_count"
9349                         FROM action.hold_request h
9350                         WHERE
9351                             cancel_time IS NULL
9352                             AND fulfillment_time IS NULL
9353                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9354                         GROUP BY 1
9355                     )y LEFT JOIN (
9356                         SELECT 
9357                             (SELECT id
9358                                 FROM biblio.record_entry 
9359                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9360                             ) AS "bre", 
9361                             COUNT(*) AS "copy_count"
9362                         FROM asset.copy
9363                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9364                         WHERE copy.holdable 
9365                             AND NOT copy.deleted 
9366                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9367                         GROUP BY 1
9368                     )x ON x.bre = y.bre
9369                 -- )z RIGHT JOIN (
9370                 --     SELECT id
9371                 --     FROM biblio.record_entry
9372                 --     WHERE NOT deleted
9373                 -- )bre ON (z.bib_id = bre.id)
9374                 
9375
9376                 </oils_persist:source_definition>
9377                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9378                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9379                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9380                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9381                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9382                 </fields>
9383                 <links>
9384                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9385                 </links>
9386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9387                         <actions>
9388                                 <retrieve/>
9389                         </actions>
9390                 </permacrud>
9391         </class>
9392
9393         <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">
9394                 <oils_persist:source_definition>
9395             SELECT *,
9396                 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,
9397                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9398             FROM
9399                 (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
9400                     FROM
9401                         action.hold_request ahr
9402                         JOIN reporter.hold_request_record rhrr USING (id)
9403                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9404                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9405                     WHERE
9406                         ahr.cancel_time IS NULL
9407                         AND ahr.fulfillment_time IS NULL
9408                     GROUP BY bib_record, pickup_lib
9409                 )x
9410                 JOIN
9411                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9412                     FROM
9413                         action.hold_request ahr
9414                         JOIN reporter.hold_request_record rhrr USING (id)
9415                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9416                     WHERE
9417                         ahr.cancel_time IS NULL
9418                         AND ahr.fulfillment_time IS NULL
9419                     GROUP BY bib_record
9420                 )y
9421                 USING (id)
9422                 </oils_persist:source_definition>
9423                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9424                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9425                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9426                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9427                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9428                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9429                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9430                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9431                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9432                 </fields>
9433                 <links>
9434                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9435                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9436                 </links>
9437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9438                         <actions>
9439                                 <retrieve/>
9440                         </actions>
9441                 </permacrud>
9442         </class>
9443
9444         <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">
9445                 <oils_persist:source_definition>
9446             SELECT
9447                 ac.id,
9448                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9449                 MAX(actac.xact_start) AS last_circ
9450             FROM asset.copy ac
9451                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9452             GROUP BY ac.id
9453
9454             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9455             --SELECT
9456             --    ac.id,
9457             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9458             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9459             --FROM asset.copy ac
9460             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9461             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9462             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9463                 </oils_persist:source_definition>
9464                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9465                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9466                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9467                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9468                 </fields>
9469                 <links>
9470                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9471                 </links>
9472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9473                         <actions>
9474                                 <retrieve/>
9475                         </actions>
9476                 </permacrud>
9477         </class>
9478
9479         <!-- ********************************************************************************************************************* -->
9480         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9481         <!-- ********************************************************************************************************************* -->
9482         <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">
9483                 <fields oils_persist:primary="id">
9484                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9485                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9486                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9487                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9488                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9489                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9490                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9491                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9492                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9493                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9494                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9495                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9496                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9497                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9498                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9499                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9500                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9501                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9502                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9503                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9504                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9505                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9506                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9507                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9508                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9509                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9510                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9511                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9512                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9513                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9514                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9515                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9516                 </fields>
9517                 <links>
9518                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9519                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9520                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9521                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9522                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9523                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9524                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9525                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9526                 </links>
9527         </class>
9528
9529         <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">
9530                 <fields oils_persist:primary="id">
9531                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9532                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9533                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9534                 </fields>
9535                 <links>
9536                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9537                 </links>
9538         </class>
9539
9540         <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">
9541                 <fields oils_persist:primary="id">
9542                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9543                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9544                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9545                 </fields>
9546                 <links>
9547                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9548                 </links>
9549         </class>
9550
9551         <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">
9552                 <fields oils_persist:primary="id">
9553                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9554
9555                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9556                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9557                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9558
9559                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9560                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9561                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9562
9563                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9564                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9565
9566                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9567                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9568                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9569
9570                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9571                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9572
9573                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9574                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9575                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9576
9577                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9578                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9579                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9580
9581                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9582                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9583                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9584                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9585
9586                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9587                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9588
9589                 </fields>
9590                 <links>
9591                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9592                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9593                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9594                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9595                 </links>
9596         </class>
9597
9598         <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">
9599                 <oils_persist:source_definition>
9600
9601             SELECT
9602                 po.ordering_agency AS ordering_agency,
9603                 po.id AS purchase_order,
9604                 li.id AS lineitem,
9605                 lid.id AS lineitem_detail,
9606                 cpa.id AS claim_policy_action
9607             FROM
9608                 acq.lineitem_detail lid
9609                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9610                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9611                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9612                 JOIN acq.claim_policy_action cpa ON (
9613                     cpa.claim_policy = cp.id
9614
9615                     -- we only care about claim policy actions whose claim
9616                     -- interval we'd reached or exceeded
9617                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9618
9619                     -- filter out all claim policy actions where claim events
9620                     -- have occurred on or after the action's action_interval
9621                     AND NOT EXISTS (
9622                         SELECT 1
9623                         FROM
9624                             acq.claim_event evt
9625                             JOIN acq.claim claim ON (
9626                                 claim.id = evt.claim
9627                                 AND claim.lineitem_detail = lid.id
9628                             )
9629                         WHERE
9630                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9631                     )
9632                 )
9633             WHERE
9634                 lid.cancel_reason IS NULL
9635                 AND li.cancel_reason IS NULL -- belt/suspenders
9636                 AND po.cancel_reason IS NULL -- belt/suspenders
9637                 AND lid.recv_time IS NULL
9638                 AND po.state = 'on-order'
9639             ORDER BY 1, 2, 3, 4, 5
9640
9641                 </oils_persist:source_definition>
9642                 <fields>
9643                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9644                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9645                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9646                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9647                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9648                 </fields>
9649                 <links>
9650                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9651                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9652                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9653                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9654                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9655                 </links>
9656         </class>
9657         <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">
9658                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9659                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9660                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9661                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9662                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9663                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9664                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9665                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9666                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9667                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9668                 </fields>
9669                 <links>
9670                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9671                 </links>
9672     </class>
9673         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
9674                 <oils_persist:source_definition>
9675             SELECT * FROM acq.lineitem_summary 
9676                                 WHERE item_count > (invoice_count + cancel_count)
9677         </oils_persist:source_definition>
9678                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9679                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9680                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9681                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9682                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9683                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9684                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9685                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9686                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9687                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9688                 </fields>
9689                 <links>
9690                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9691                 </links>
9692     </class>
9693         <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">
9694                 <oils_persist:source_definition>
9695
9696                         SELECT  t.*
9697                           FROM  action.transit_copy t
9698                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9699                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9700                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9701
9702                 </oils_persist:source_definition>
9703                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9704                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9705                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9706                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9707                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9708                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9709                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9710                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9711                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9712                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9713                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9714                 </fields>
9715                 <links>
9716                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9717                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9718                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9719                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9720                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9721                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9722                 </links>
9723         </class>
9724
9725     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9726                 <oils_persist:source_definition>
9727
9728         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9729                 SELECT
9730                         cp.id as copy,
9731                         COUNT(circ.id),
9732                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9733                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9734                 FROM
9735                         asset.copy cp
9736                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9737                 GROUP BY 1, 3, 4
9738                 UNION
9739                 SELECT
9740                         cp.id as copy,
9741                         COUNT(circ.id),
9742                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9743                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9744                 FROM
9745                         asset.copy cp
9746                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9747                 GROUP BY 1, 3, 4
9748                 UNION
9749                 SELECT
9750                         id as copy,
9751                         circ_count,
9752                         -1 AS year,
9753                         false as is_renewal
9754                 FROM
9755                         extend_reporter.legacy_circ_count
9756         )x GROUP BY 1, 3, 4
9757
9758                 </oils_persist:source_definition>
9759         <fields>
9760             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9761             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9762             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9763             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9764         </fields>
9765                 <links>
9766                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9767                 </links>
9768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9769                         <actions>
9770                                 <retrieve/>
9771                         </actions>
9772                 </permacrud>
9773     </class>
9774
9775         <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">
9776                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9777                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9778                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9779                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9780                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9781                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9782                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9783                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9784                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9785                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9786                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9787                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9788                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9789                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9790                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9791                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9792                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9793                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9794                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9795                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9796                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9797                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9798                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9799                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9800                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9801                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9802                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9803                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9804                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9805                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9806                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9807                 </fields>
9808                 <links>
9809                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9810                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9811                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9812                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9813                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9814                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9815                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9816                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9817                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9818                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9819                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9820                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9821                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9822                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9823                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9824                 </links>
9825         </class>
9826
9827     <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">
9828         <fields oils_persist:primary="id">
9829             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9830             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9831             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9832             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9833             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9834             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9835             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9836             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9837             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9838             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9839             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9840             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9841             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9842             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9843             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9844             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9845             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9846             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9847             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9848             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9849             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9850             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9851             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9852             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9853             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9854             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9855             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9856             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9857             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9858             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9859             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9860             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9861             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9862             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9863         </fields>
9864         <links>
9865             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9866             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9867             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9868             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9869             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9870         </links>
9871     </class>
9872
9873     <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">
9874         <fields oils_persist:primary="id">
9875             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9876             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9877             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9878             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9879         </fields>
9880         <links>
9881             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9882             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9883         </links>
9884     </class>
9885
9886     <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">
9887         <fields oils_persist:primary="owning_lib">
9888             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9889             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9890             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9891         </fields>
9892         <links>
9893             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9894         </links>
9895     </class>
9896
9897     <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">
9898         <fields oils_persist:primary="id">
9899             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9900             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9901             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9902             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9903             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9904         </fields>
9905         <links>
9906             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9907             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9908             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9909         </links>
9910     </class>
9911
9912     <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">
9913         <fields oils_persist:primary="circ_lib">
9914             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9915             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9916             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9917             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9918         </fields>
9919         <links>
9920             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9921             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9922         </links>
9923     </class>
9924
9925     <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">
9926         <fields oils_persist:primary="id">
9927             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9928             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9929             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9930             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9931             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9932         </fields>
9933         <links>
9934             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9935             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9936             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9937         </links>
9938     </class>
9939
9940     <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">
9941         <fields oils_persist:primary="home_ou">
9942             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9943             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9944             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9945             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9946         </fields>
9947         <links>
9948             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9949             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9950         </links>
9951     </class>
9952         <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">
9953                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9954                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9955                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9956                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9957                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9958                 </fields>
9959                 <links>
9960                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9961                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9962                 </links>
9963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9964                         <actions>
9965                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9966                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9967                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9968                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9969                         </actions>
9970                 </permacrud>
9971         </class>
9972         <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">
9973                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9974                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9975                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9976                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9977                 </fields>
9978                 <links>
9979                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9980                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9981                         </links>
9982                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9983                 <actions>
9984                                 <create permission="ADMIN_ACQ_FUND_TAG">
9985                                         <context link="tag" field="owner"/>
9986                                 </create>
9987                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9988                                         <context link="tag" field="owner"/>
9989                                 </retrieve>
9990                                 <update permission="ADMIN_ACQ_FUND_TAG">
9991                                         <context link="tag" field="owner"/>
9992                                 </update>
9993                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9994                                         <context link="tag" field="owner"/>
9995                                 </delete>
9996                         </actions>
9997                 </permacrud>
9998         </class>
9999         <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">
10000                 <oils_persist:source_definition><![CDATA[
10001                 SELECT
10002                         poi.purchase_order AS purchase_order,
10003                         ii.invoice AS invoice,
10004                         NULL AS lineitem,
10005                         poi.id AS po_item,
10006                         NULL AS picklist
10007                 FROM
10008                         acq.po_item poi
10009                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10010                 UNION SELECT
10011                         jub.purchase_order AS purchase_order,
10012                         ie.invoice AS invoice,
10013                         jub.id AS lineitem,
10014                         NULL AS po_item,
10015                         jub.picklist AS picklist
10016                 FROM
10017                         acq.lineitem jub
10018                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10019                 UNION SELECT
10020                         ii.purchase_order AS purchase_order,
10021                         ii.invoice AS invoice,
10022                         NULL AS lineitem,
10023                         NULL AS po_item,
10024                         NULL AS picklist
10025                 FROM
10026                         acq.invoice_item ii
10027                 WHERE ii.po_item IS NULL
10028                 UNION SELECT
10029                         ie.purchase_order AS purchase_order,
10030                         ie.invoice AS invoice,
10031                         NULL AS lineitem,
10032                         NULL AS po_item,
10033                         NULL AS picklist
10034                 FROM
10035                         acq.invoice_entry ie
10036                 WHERE ie.lineitem IS NULL
10037                 UNION SELECT
10038                         NULL AS purchase_order,
10039                         NULL AS invoice,
10040                         jub.id AS lineitem,
10041                         NULL AS po_item,
10042                         jub.picklist AS picklist
10043                 FROM
10044                         acq.lineitem jub
10045                 WHERE jub.purchase_order IS NULL
10046                 ]]></oils_persist:source_definition>
10047                 <fields>
10048                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10049                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10050                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10051                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10052                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10053                 </fields>
10054                 <links>
10055                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10056                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10057                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10058                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10059                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10060                 </links>
10061         </class>
10062         <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">
10063                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10064                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10065                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10066                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10067                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10068                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10069                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10070                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10071                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10072                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10073                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10074                 </fields>
10075                 <links>
10076                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10077                 </links>
10078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10079                         <actions>
10080                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10081                                 <retrieve/>
10082                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10083                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10084                         </actions>
10085                 </permacrud>
10086         </class>
10087
10088         <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">
10089                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10090                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10091                         <field name="date_applied" reporter:datatype="timestamp"/>
10092                         <field name="org" reporter:datatype="org_unit"/>
10093                         <field name="original_value" reporter:datatype="text"/>
10094                         <field name="new_value" reporter:datatype="text"/>
10095                         <field name="field_name" reporter:datatype="link"/>
10096                 </fields>
10097                 <links>
10098                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10099                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10100                 </links>
10101                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10102                         <actions>
10103                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10104                                 <retrieve/>
10105                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10106                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10107                         </actions>
10108                 </permacrud>
10109         </class>
10110         <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">
10111                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10112                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10113                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10114                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10115                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10116                 </fields>
10117                 <links>
10118                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10119                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10120                 </links>
10121         </class>
10122         <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">
10123                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10124                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10125                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10126                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10127                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10128                 </fields>
10129                 <links>
10130                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10131                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10132                 </links>
10133         </class>
10134
10135
10136         <!-- ********************************************************************************************************************* -->
10137
10138 </IDL>
10139
10140 <!--
10141     vim:noet:ts=4:sw=4:
10142 -->