]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Make it possible to suppress IDL fields
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
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" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2809                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2810                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2811                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2812                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2813                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2814                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2815                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2816                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2817                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2818                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2819                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2820                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2821                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2822                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2823                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2824                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2825                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2826                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2827                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2828                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2829                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2830                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2831                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2832                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2833                 </fields>
2834                 <links>
2835                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2836                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2837                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2838                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2839                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2840                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2841                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2842                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2843                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2844                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2845                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2846                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2847                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2848                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2849                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2850                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2851                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2852                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2853                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2854                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2855                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2856                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2857                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2858                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2859                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2860                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2861                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2862                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2863                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2864                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2865                 </links>
2866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2867                         <actions>
2868                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
2869                         </actions>
2870                 </permacrud>
2871         </class>
2872         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
2873                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2874                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2875                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2876                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2877                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2878                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2879                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2880                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2881                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2882         </fields>
2883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2884                         <actions>
2885                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2886                                 <retrieve/>
2887                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2888                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2889                         </actions>
2890                 </permacrud>
2891         </class>
2892         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
2893                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2894                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2895                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2896                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2897                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2898         </fields>
2899         <links>
2900                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2901                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2902                 </links>
2903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2904                         <actions>
2905                                 <retrieve permission="RUN_REPORTS">
2906                                         <context link="usr" field="home_ou" />
2907                                 </retrieve>
2908                         </actions>
2909                 </permacrud>
2910         </class>
2911         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2912                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2913                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2914                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2915                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2916                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2917                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2918                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2919         </fields>
2920         <links>
2921                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2922                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2923                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2924                 </links>
2925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2926                         <actions>
2927                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2928                                         <context link="usr" field="home_ou" />
2929                                         <context link="ws" field="owning_lib" />
2930                                 </retrieve>
2931                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2932                                         <context link="usr" field="home_ou" />
2933                                         <context link="ws" field="owning_lib" />
2934                                 </create>
2935                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2936                                         <context link="usr" field="home_ou" />
2937                                         <context link="ws" field="owning_lib" />
2938                                 </update>
2939                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2940                                         <context link="usr" field="home_ou" />
2941                                         <context link="ws" field="owning_lib" />
2942                                 </delete>
2943                         </actions>
2944                 </permacrud>
2945         </class>
2946         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
2947                 <fields oils_persist:primary="name">
2948                         <field name="name" reporter:datatype="text"/>
2949                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2950                 </fields>
2951                 <links/>
2952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2953                         <actions>
2954                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2955                                 <retrieve/>
2956                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2957                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2958                         </actions>
2959                 </permacrud>
2960         </class>
2961         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
2962                 <fields oils_persist:primary="name">
2963                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2964                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2965                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2966                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2967                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2968                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2969                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2970                 </fields>
2971                 <links>
2972                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2973                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2974                 </links>
2975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2976                         <actions>
2977                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2978                                 <retrieve/>
2979                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2980                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2981                         </actions>
2982                 </permacrud>
2983         </class>
2984         <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
2985                 <fields oils_persist:primary="name">
2986                         <field name="name" reporter:datatype="text"/>
2987                         <field name="label" reporter:datatype="text"/>
2988                         <field name="description" reporter:datatype="text"/>
2989                         <field name="datatype" reporter:datatype="text"/>
2990                         <field name="view_perm" reporter:datatype="link"/>
2991                         <field name="update_perm" reporter:datatype="link"/>
2992                         <field name="fm_class" reporter:datatype="text"/>
2993                         <field name="grp" reporter:datatype="link"/>
2994                 </fields>
2995                 <links>
2996                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2997                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2998                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2999                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3000                 </links>
3001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3002                         <actions>
3003                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3004                                 <retrieve/>
3005                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3006                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3007                         </actions>
3008                 </permacrud>
3009         </class>
3010         <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
3011                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3012                         <field name="id" />
3013                         <field name="name"  reporter:datatype="text"/>
3014                         <field name="org_unit" reporter:datatype="org_unit"/>
3015                         <field name="value"  reporter:datatype="text"/>
3016                 </fields>
3017                 <links>
3018                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3019                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3020                 </links>
3021         </class>
3022         <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
3023                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3024                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3025                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3026                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3027                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3028                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3029                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3030                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3031                 </fields>
3032                 <links>
3033                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3034                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3035                 </links>
3036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3037             <actions>
3038                 <create permission="CREATE_COPY_NOTE">
3039                     <context link="owning_copy" field="circ_lib"/>
3040                 </create>
3041                 <retrieve permission="VIEW_COPY_NOTES">
3042                     <context link="owning_copy" field="circ_lib"/>
3043                 </retrieve>
3044                 <update permission="UPDATE_COPY_NOTE">
3045                     <context link="owning_copy" field="circ_lib"/>
3046                 </update>
3047                 <delete permission="DELETE_COPY_NOTE">
3048                     <context link="owning_copy" field="circ_lib"/>
3049                 </delete>
3050             </actions>
3051         </permacrud>
3052         </class>
3053         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3054                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3055                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3056                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3057                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3058                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3059                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3060                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3061                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3062                 </fields>
3063                 <links>
3064                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3065                 </links>
3066         </class>
3067         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3068                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3069                         <field name="fingerprint"  reporter:datatype="text"/>
3070                         <field name="id" reporter:datatype="id" />
3071                         <field name="master_record" reporter:datatype="link"/>
3072                         <field name="mods"  reporter:datatype="text"/>
3073                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3074                 </fields>
3075                 <links>
3076                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3077                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3078                 </links>
3079         </class>
3080         <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
3081                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3082                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3083                         <field name="name"  reporter:datatype="text"/>
3084                 </fields>
3085                 <links/>
3086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3087             <actions>
3088                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3089                 <retrieve/>
3090                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3091                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3092             </actions>
3093         </permacrud>
3094         </class>
3095         <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
3096                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3097                         <field name="code"  reporter:datatype="text"/>
3098                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3099                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3100                 </fields>
3101                 <links/>
3102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3103             <actions>
3104                 <create permission="CREATE_PERM" global_required="true"/>
3105                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3106                 <update permission="UPDATE_PERM" global_required="true"/>
3107                 <delete permission="DELETE_PERM" global_required="true"/>
3108             </actions>
3109         </permacrud>
3110         </class>
3111         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3112                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3113                         <field name="id" reporter:datatype="id" />
3114                         <field name="metarecord" reporter:datatype="link"/>
3115                         <field name="source" reporter:datatype="link"/>
3116                 </fields>
3117                 <links>
3118                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3119                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3120                 </links>
3121         </class>
3122         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
3123                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3124                         <field name="id" reporter:datatype="id" />
3125                         <field name="field" reporter:datatype="link"/>
3126                         <field name="source" reporter:datatype="link"/>
3127                         <field name="value"  reporter:datatype="text"/>
3128                 </fields>
3129                 <links>
3130                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3131                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3132                 </links>
3133         </class>
3134         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
3135                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3136                         <field name="id" reporter:datatype="id" />
3137                         <field name="value" reporter:datatype="text"/>
3138                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3139                 </fields>
3140                 <links>
3141                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3142                 </links>
3143         </class>
3144         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
3145                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3146                         <field name="id" reporter:datatype="id" />
3147                         <field name="entry" reporter:datatype="link"/>
3148                         <field name="def" reporter:datatype="link"/>
3149                         <field name="source" reporter:datatype="link"/>
3150                 </fields>
3151                 <links>
3152                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3153                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3154                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3155                 </links>
3156         </class>
3157         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
3158                 <oils_persist:source_definition>
3159                         SELECT * FROM metabib.author_field_entry
3160                                                 UNION ALL
3161                         SELECT * FROM metabib.keyword_field_entry
3162                                                 UNION ALL
3163                         SELECT * FROM metabib.identifier_field_entry
3164                                                 UNION ALL
3165                         SELECT * FROM metabib.title_field_entry
3166                                                 UNION ALL
3167                         SELECT * FROM metabib.subject_field_entry
3168                                                 UNION ALL
3169                         SELECT * FROM metabib.series_field_entry
3170                 </oils_persist:source_definition>
3171                 <fields>
3172                         <field name="field" reporter:datatype="link"/>
3173                         <field name="id" reporter:datatype="id" />
3174                         <field name="source" reporter:datatype="link"/>
3175                         <field name="value"  reporter:datatype="text"/>
3176                 </fields>
3177                 <links>
3178                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3179                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3180                 </links>
3181         </class>
3182         <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
3183                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3184                         <field name="field" reporter:datatype="link"/>
3185                         <field name="id" reporter:datatype="id" />
3186                         <field name="source" reporter:datatype="link"/>
3187                         <field name="value"  reporter:datatype="text"/>
3188                 </fields>
3189                 <links>
3190                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3191                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3192                 </links>
3193         </class>
3194         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3195                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3196                         <field name="accepting_usr" reporter:datatype="link"/>
3197                         <field name="amount" reporter:datatype="money" />
3198                         <field name="amount_collected" reporter:datatype="money" />
3199                         <field name="cash_drawer" reporter:datatype="link"/>
3200                         <field name="id" reporter:datatype="id" />
3201                         <field name="note"  reporter:datatype="text"/>
3202                         <field name="payment_ts" reporter:datatype="timestamp"/>
3203                         <field name="xact" reporter:datatype="link"/>
3204                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3205                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3206                 </fields>
3207                 <links>
3208                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3209                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3210                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3211                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3212                 </links>
3213         </class>
3214         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3216                         <field name="accepting_usr" reporter:datatype="link"/>
3217                         <field name="amount" reporter:datatype="money" />
3218                         <field name="amount_collected" reporter:datatype="money" />
3219                         <field name="id" reporter:datatype="id" />
3220                         <field name="note"  reporter:datatype="text"/>
3221                         <field name="payment_ts" reporter:datatype="timestamp"/>
3222                         <field name="xact" reporter:datatype="link"/>
3223                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3224                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3225                 </fields>
3226                 <links>
3227                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3228                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3229                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3230                 </links>
3231         </class>
3232         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3233                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3234                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3235                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3236                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3237                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3238                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3239                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3240                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3241                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3242                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3243                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3244                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3245                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3246                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3247                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3248                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3249                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3250                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3251                 </fields>
3252                 <links>
3253                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3254                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3255                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3256                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3257                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3258                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3259                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3260                 </links>
3261         </class>
3262
3263         <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
3264                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3265                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3266                         <field name="name"  reporter:datatype="text"/>
3267                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3268                         <field name="block_list" reporter:datatype="text"/>
3269                         <field name="staff_alert" reporter:datatype="bool"/>
3270                         <field name="org_depth" reporter:datatype="int"/>
3271                 </fields>
3272                 <links/>
3273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3274             <actions>
3275                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3276                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3277                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3278                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3279             </actions>
3280         </permacrud>
3281         </class>
3282         <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">
3283                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3284                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3285                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3286                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3287                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3288                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3289                 </fields>
3290                 <links>
3291                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3292                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3293                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3294         </links>
3295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3296             <actions>
3297                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3298                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3299                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3300                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3301             </actions>
3302         </permacrud>
3303         </class>
3304         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
3305                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3306                         <field name="holdable" reporter:datatype="bool"/>
3307                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3308                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3309                         <field name="opac_visible" reporter:datatype="bool"/>
3310             <field name="copy_active" reporter:datatype="bool"/>
3311             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3312                 </fields>
3313                 <links/>
3314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3315             <actions>
3316                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3317                 <retrieve/>
3318                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3319                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3320             </actions>
3321         </permacrud>
3322         </class>
3323         <class id="ausp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty" oils_persist:restrict_primary="100" reporter:label="User Standing Penalty">
3324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3325                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3326                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3327                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3328                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3329                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3330                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3331                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3332                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3333                 </fields>
3334                 <links>
3335                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3336                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3337                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3338                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3339                 </links>
3340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3341                         <actions>
3342                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3343                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3344                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3345                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3346                         </actions>
3347                 </permacrud>
3348         </class>
3349         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3350                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3351                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3352                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3353                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3354                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3355                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3356                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3357                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3358                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3359                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3360                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3361                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3362                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3363                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3364                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3365                 </fields>
3366                 <links>
3367                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3368                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3369                 </links>
3370         </class>
3371         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
3372                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3373                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3374                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3375                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3376                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3377                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3378                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3379                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3380                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3381                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3382                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3383                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3384                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3385                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3386                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3387                 </fields>
3388                 <links>
3389                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3390                 </links>
3391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3392                         <actions>
3393                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3394                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3395                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3396                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3397                         </actions>
3398                 </permacrud>
3399         </class>
3400
3401
3402         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
3403                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3404                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3405                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3406                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3407                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3408                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3409                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3410                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3411                 </fields>
3412                 <links>
3413                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3414                 </links>
3415         </class>
3416
3417         <class id="acnn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_note" oils_persist:tablename="asset.call_number_note" reporter:label="Call Number Note">
3418                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3419                         <field name="call_number" />
3420                         <field name="create_date" reporter:datatype="timestamp"/>
3421                         <field name="creator" reporter:datatype="link"/>
3422                         <field name="id" reporter:datatype="id" />
3423                         <field name="pub" reporter:datatype="bool"/>
3424                         <field name="title"  reporter:datatype="text"/>
3425                         <field name="value"  reporter:datatype="text"/>
3426                 </fields>
3427                 <links>
3428                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3429                 </links>
3430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3431             <actions>
3432                 <create permission="CREATE_VOLUME_NOTE">
3433                     <context link="call_number" field="owning_lib"/>
3434                 </create>
3435                 <retrieve permission="VIEW_VOLUME_NOTES">
3436                     <context link="call_number" field="owning_lib"/>
3437                 </retrieve>
3438                 <update permission="UPDATE_VOLUME_NOTE">
3439                     <context link="call_number" field="owning_lib"/>
3440                 </update>
3441                 <delete permission="DELETE_VOLUME_NOTE">
3442                     <context link="call_number" field="owning_lib"/>
3443                 </delete>
3444             </actions>
3445         </permacrud>
3446         </class>
3447         <class id="arn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_note" oils_persist:tablename="authority.record_note" reporter:label="Authority Record Note">
3448                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3449                         <field name="create_date" reporter:datatype="timestamp"/>
3450                         <field name="creator" reporter:datatype="link"/>
3451                         <field name="edit_date" reporter:datatype="timestamp"/>
3452                         <field name="editor" reporter:datatype="link"/>
3453                         <field name="id" reporter:datatype="id" />
3454                         <field name="record" reporter:datatype="link"/>
3455                         <field name="value" reporter:datatype="text"/>
3456                 </fields>
3457                 <links>
3458                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3459                 </links>
3460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3461             <actions>
3462                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3463                 <retrieve/>
3464                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3465                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3466             </actions>
3467         </permacrud>
3468         </class>
3469         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3470         <oils_persist:source_definition>
3471 SELECT  usr,
3472         SUM(
3473             CASE
3474                 WHEN (
3475                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3476                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3477                 ) THEN 1
3478                 ELSE 0
3479             END
3480         ) AS out,
3481
3482         SUM(
3483             CASE
3484                 WHEN (
3485                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3486                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3487                 ) THEN 1
3488                 ELSE 0
3489             END
3490         ) AS overdue,
3491
3492         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3493         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3494         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3495   FROM  action.circulation
3496   WHERE checkin_time IS NULL
3497   GROUP BY 1
3498         </oils_persist:source_definition>
3499         <fields oils_persist:primary="usr">
3500             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3501             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3502             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3503             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3504             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3505             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3506         </fields>
3507         <links>
3508             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3509         </links>
3510         </class>
3511         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3512         <oils_persist:source_definition>
3513 SELECT  usr,
3514         ARRAY_TO_STRING(ARRAY_ACCUM(
3515             CASE
3516                 WHEN (
3517                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3518                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3519                 ) THEN id
3520                 ELSE 0
3521             END
3522         ),',') AS out,
3523
3524         ARRAY_TO_STRING(ARRAY_ACCUM(
3525             CASE
3526                 WHEN (
3527                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3528                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3529                 ) THEN id
3530                 ELSE 0
3531             END
3532         ),',') AS overdue,
3533
3534         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3535         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3536         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3537   FROM  action.circulation
3538   WHERE checkin_time IS NULL
3539   GROUP BY 1
3540         </oils_persist:source_definition>
3541         <fields oils_persist:primary="usr">
3542             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3543             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3544             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3545             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3546             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3547             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3548         </fields>
3549         <links>
3550             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3551         </links>
3552         </class>
3553         <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3554                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3555                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3556                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3557                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3558                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3559                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3560                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3561                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3562                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3563                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3564                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3565                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3566                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3567                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3568                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3569                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3570                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3571                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3572                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3573                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3574                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3575                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3576                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3577                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3578                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3579                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3580                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3581                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3582                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3583                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3584                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3585                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3586                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3587                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3588                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3589                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3590                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3591                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3592                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3593                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3594                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3595                 </fields>
3596                 <links>
3597                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3598                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3599                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3600                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3601                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3602                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3603                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3604                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3605                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3606                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3607                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3608                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3609                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3610                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3611                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3612                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3613                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3614                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3615                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3616                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3617                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3618                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3619                 </links>
3620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3621                         <actions>
3622                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3623                         </actions>
3624                 </permacrud>
3625         </class>
3626         <class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
3627                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3628                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3629                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3630                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3631                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3632                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3633                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3634                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3635                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3636                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3637                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3638                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3639                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3640                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3641                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3642                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3643                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3644                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3645                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3646                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3647                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3648                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3649                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3650                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3651                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3652                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3653                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3654                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3655                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3656                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3657                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3658                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3659                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3660                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3661                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3662                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3663                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3664                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3665                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3666                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3667                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3668                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3669                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3670                 </fields>
3671                 <links>
3672                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3673                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3674                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3675                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3676                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3677                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3678                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3679                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3680                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3681                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3682                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3683                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3684                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3685                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3686                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3687                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3688                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3689                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3690                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3691                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3692                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3693                 </links>
3694         </class>
3695         <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">
3696                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3697                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3698                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3699                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3700                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3701                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3702                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3703                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3704                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3705                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3706                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3707                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3708                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3709                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3710                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3711                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3712                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3713                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3714                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3715                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3716                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3717                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3718                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3719                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3720                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3721                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3722                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3723                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3724                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3725                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3726                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3727                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3728                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3729                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3730                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3731                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3732                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3733                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3734                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3735                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3736                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3737                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3738                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3739                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3740                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3741                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3742                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3743                 </fields>
3744                 <links>
3745                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3746                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3747                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3748                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3749                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3750                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3751                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3752                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3753                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3754                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3755                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3756                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3757                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3758                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3759                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3760                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3761                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3762                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3763                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3764                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3765                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3766                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3767                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3768                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3769                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3770                 </links>
3771         </class>
3772
3773         <class id="brt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_type" oils_persist:tablename="booking.resource_type" reporter:label="Resource Type">
3774                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3775                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3776                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3777                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3778                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3779                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3780                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3781                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3782                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3783                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3784                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3785                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3786                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3787                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3788                 </fields>
3789                 <links>
3790                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3791                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3792                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3793                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3794                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3795                 </links>
3796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3797                         <actions>
3798                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3799                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3800                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3801                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3802                         </actions>
3803                 </permacrud>
3804         </class>
3805
3806         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3807                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3808                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3809                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3810                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3811                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3812                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3813                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3814                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3815                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3816                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3817                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3818                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3819                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3820                 </fields>
3821                 <links>
3822                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3823                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3824                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3825                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3826                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3827                 </links>
3828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3829                         <actions>
3830                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3831                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3832                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3833                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3834                         </actions>
3835                 </permacrud>
3836         </class>
3837         
3838         <class id="bra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr" oils_persist:tablename="booking.resource_attr" reporter:label="Resource Attribute">
3839                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3840                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3841                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3842                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3843                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3844                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3845                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3846                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3847                 </fields>
3848                 <links>
3849                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3850                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3851                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3852                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3853                 </links>
3854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3855                         <actions>
3856                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3857                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3858                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3859                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3860                         </actions>
3861                 </permacrud>
3862         </class>
3863         
3864         <class id="brav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_value" oils_persist:tablename="booking.resource_attr_value" reporter:label="Resource Attribute Value">
3865                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3866                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3867                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3868                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3869                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3870                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3871                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3872                 </fields>
3873                 <links>
3874                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3875                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3876                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3877                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3878                 </links>
3879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3880                         <actions>
3881                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3882                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3883                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3884                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3885                         </actions>
3886                 </permacrud>
3887         </class>
3888         
3889         <class id="bram" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_map" oils_persist:tablename="booking.resource_attr_map" reporter:label="Resource Attribute Map">
3890                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3891                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3892                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3893                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3894                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3895                 </fields>
3896                 <links>
3897                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3898                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3899                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3900                 </links>
3901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3902                         <actions>
3903                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3904                     <context link="resource" field="owner" />
3905                 </create>
3906                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3907                     <context link="resource" field="owner" />
3908                 </retrieve>
3909                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3910                     <context link="resource" field="owner" />
3911                 </update>
3912                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3913                     <context link="resource" field="owner" />
3914                 </delete>
3915                         </actions>
3916                 </permacrud>
3917         </class>
3918         
3919         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3920                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3921                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3922                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3923                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3924                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3925                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3926                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3927                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3928                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3929                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3930                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3932                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3933                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3934                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3935                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3936                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3937                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3938                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3939                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3940                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3941                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3942                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3943                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3944                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3945                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3946                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3947                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3948                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3949                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3950                 </fields>
3951                 <links>
3952                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3953                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3954                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3955                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3956                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3957                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3958                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3959                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3960                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3961                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3962                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3963                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3964                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3965                 </links>
3966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3967                         <actions>
3968                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3969                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3970                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3971                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3972                         </actions>
3973                 </permacrud>
3974         </class>
3975         
3976         <class id="bravm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation_attr_value_map" oils_persist:tablename="booking.reservation_attr_value_map" reporter:label="Reservation Attribute Value Map">
3977                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3978                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3979                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3980                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3981                 </fields>
3982                 <links>
3983                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3984                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3985                 </links>
3986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3987                         <actions>
3988                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3989                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3990                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3991                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3992                         </actions>
3993                 </permacrud>
3994         </class>
3995
3996         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
3997                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3998                         <field name="bucket" reporter:datatype="link"/>
3999                         <field name="id" reporter:datatype="id" />
4000                         <field name="target_call_number" reporter:datatype="link" />
4001                         <field name="create_time" reporter:datatype="timestamp" />
4002                         <field name="pos" reporter:datatype="int" />
4003                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4004                 </fields>
4005                 <links>
4006                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4007                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4008             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4009                 </links>
4010         </class>
4011         <class id="ccnbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item_note" oils_persist:tablename="container.call_number_bucket_item_note" reporter:label="Call Number Bucket Item Note">
4012                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4013                         <field name="id" reporter:datatype="id" />
4014                         <field name="item" reporter:datatype="link"/>
4015                         <field name="note" reporter:datatype="text" />
4016                 </fields>
4017                 <links>
4018                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4019                 </links>
4020         </class>
4021         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
4022                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4023                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4024                         <field name="btype" reporter:datatype="text"/>
4025                         <field name="id" reporter:datatype="id" />
4026                         <field name="name" reporter:datatype="text"/>
4027                         <field name="description" reporter:datatype="text"/>
4028                         <field name="owner" reporter:datatype="link"/>
4029                         <field name="pub" reporter:datatype="bool"/>
4030                         <field name="create_time" reporter:datatype="timestamp" />
4031                 </fields>
4032                 <links>
4033                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4034                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4035                 </links>
4036         </class>
4037         <class id="cbrebn" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_note" oils_persist:tablename="container.biblio_record_entry_bucket_note" reporter:label="Bibliographic Record Entry Bucket Note">
4038                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4039                         <field name="id" reporter:datatype="id" />
4040                         <field name="bucket" reporter:datatype="link"/>
4041                         <field name="note" reporter:datatype="text" />
4042                 </fields>
4043                 <links>
4044                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4045                 </links>
4046         </class>
4047         <class id="ahcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_copy_map" oils_persist:tablename="action.hold_copy_map" reporter:label="Hold Copy Map">
4048                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4049                         <field name="hold" reporter:datatype="link"/>
4050                         <field name="id" reporter:datatype="id" />
4051                         <field name="target_copy" reporter:datatype="link"/>
4052                 </fields>
4053                 <links>
4054                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4055                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4056                 </links>
4057         </class>
4058         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4059                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4060                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4061                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4062                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4063                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4064                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4065                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4066                 </fields>
4067                 <links>
4068                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4069                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4070                 </links>
4071         </class>
4072         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location">
4073                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4074                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4075                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4076                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4077                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4078                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4079                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4080                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4081                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4082                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4083                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4084                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4085                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4086                 </fields>
4087                 <links>
4088                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4089                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4090                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4091                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4092                 </links>
4093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4094             <actions>
4095                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4096                 <retrieve/>
4097                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4098                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4099             </actions>
4100         </permacrud>
4101         </class>
4102         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
4103                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4104                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4105                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4106                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4107                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4108             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4109             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4110             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4111                 </fields>
4112                 <links>
4113                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4114                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4115                 </links>
4116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4117             <actions>
4118                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4119                 <retrieve/>
4120                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4121                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4122             </actions>
4123         </permacrud>
4124         </class>
4125         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
4126                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4127                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4128             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4129             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4130                 </fields>
4131                 <links>
4132                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4133                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4134                 </links>
4135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4136             <actions>
4137                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4138                                         <context link="lgroup" field="owner" />
4139                 </create>
4140                 <retrieve/>
4141                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4142                                         <context link="lgroup" field="owner" />
4143                 </update>
4144                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4145                                         <context link="lgroup" field="owner" />
4146                 </delete>
4147             </actions>
4148         </permacrud>
4149         </class>
4150
4151     <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
4152         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4153             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4154             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4155             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4156             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4157         </fields>
4158         <links>
4159             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4160             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4161         </links>
4162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4163             <actions>
4164                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4165                 <retrieve/>
4166                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4167                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4168             </actions>
4169         </permacrud>
4170     </class>
4171
4172         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4173                 <fields>
4174                         <field name="sre_id" oils_persist:virtual="true" />
4175                         <field name="location" oils_persist:virtual="true" />
4176                         <field name="owning_lib" oils_persist:virtual="true" />
4177                         <field name="basic_holdings" oils_persist:virtual="true" />
4178                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4179                         <field name="supplement_holdings" oils_persist:virtual="true" />
4180                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4181                         <field name="index_holdings" oils_persist:virtual="true" />
4182                         <field name="index_holdings_add" oils_persist:virtual="true" />
4183                         <field name="online" oils_persist:virtual="true" />
4184                         <field name="missing" oils_persist:virtual="true" />
4185                         <field name="incomplete" oils_persist:virtual="true" />
4186                 </fields>
4187         </class>
4188
4189         <class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">
4190                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4191                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4192                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4193                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4194                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4195                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4196                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4197                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4198                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4199                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4200                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4201                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4202                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4203                 </fields>
4204                 <links>
4205                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4206                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4207                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4208                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4209                 </links>
4210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4211                         <actions>
4212                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4213                                 <retrieve/>
4214                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4215                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4216                         </actions>
4217                 </permacrud>
4218         </class>
4219
4220         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
4221                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4222                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4223                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4224                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4225                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4226                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4227                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4228                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4229                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4230                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4231                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4232                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4233                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4234                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4235                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4236                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4237                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4238                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4239                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4240                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4241                 </fields>
4242                 <links>
4243                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4244                 </links>
4245                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4246                         <actions>
4247                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4248                                         <context link="subscription" field="owning_lib" />
4249                                 </create>
4250                                 <retrieve />
4251                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4252                                         <context link="subscription" field="owning_lib" />
4253                                 </update>
4254                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4255                                         <context link="subscription" field="owning_lib" />
4256                                 </delete>
4257                         </actions>
4258                 </permacrud>
4259         </class>
4260
4261         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4262                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4263                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4264                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4265                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4266                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4267                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4268                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4269                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4270                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4271                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4272                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4273                 </fields>
4274                 <links>
4275                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4276                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4277                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4278                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4279                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4280                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4281                 </links>
4282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4283                         <actions>
4284                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4285                                 <retrieve />
4286                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4287                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4288                         </actions>
4289                 </permacrud>
4290         </class>
4291
4292         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4293                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4294                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4295                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4296                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4297                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4298                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4299                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4300                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4301                 </fields>
4302                 <links>
4303                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4304                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4305                 </links>
4306         </class>
4307
4308         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4309                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4310                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4311                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4312                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4313                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4314                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4315                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4316                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4317                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4318                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4319                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4320                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4321                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4322                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4323                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4324                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4325                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4326                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4327                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4328                 </fields>
4329                 <links>
4330                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4331                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4332                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4333                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4334                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4335                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4336                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4337                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4338                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4339                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4340                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4341                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4342                 </links>
4343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4344                         <actions>
4345                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4346                                 <retrieve />
4347                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4348                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4349                         </actions>
4350                 </permacrud>
4351         </class>
4352
4353         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
4354                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4355                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4356                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4357                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4358                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4359                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4360                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4361                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4362                 </fields>
4363                 <links>
4364                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4365                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4366                 </links>
4367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4368                         <actions>
4369                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4370                                         <context link="distribution" field="holding_lib" />
4371                                 </create>
4372                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4373                                         <context link="distribution" field="holding_lib" />
4374                                 </retrieve>
4375                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4376                                         <context link="distribution" field="holding_lib" />
4377                                 </update>
4378                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4379                                         <context link="distribution" field="holding_lib" />
4380                                 </delete>
4381                         </actions>
4382                 </permacrud>
4383         </class>
4384
4385         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4386                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4387                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4388                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4389                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4390                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4391                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4392                 </fields>
4393                 <links>
4394                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4395                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4396                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4397                 </links>
4398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4399                         <actions>
4400                                 <create permission="ADMIN_SERIAL_STREAM">
4401                                         <context link="distribution" field="holding_lib" />
4402                                 </create>
4403                                 <retrieve />
4404                                 <update permission="ADMIN_SERIAL_STREAM">
4405                                         <context link="distribution" field="holding_lib" />
4406                                 </update>
4407                                 <delete permission="ADMIN_SERIAL_STREAM">
4408                                         <context link="distribution" field="holding_lib" />
4409                                 </delete>
4410                         </actions>
4411                 </permacrud>
4412         </class>
4413
4414         <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
4415                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4416                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4417                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4418                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4419                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4420                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4421                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4422                 </fields>
4423                 <links>
4424                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4425                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4426                 </links>
4427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4428                         <actions>
4429                                 <create permission="ADMIN_SERIAL_STREAM">
4430                                         <context link="stream" jump="distribution" field="holding_lib" />
4431                                 </create>
4432                                 <retrieve permission="RECEIVE_SERIAL">
4433                                         <context link="stream" jump="distribution" field="holding_lib" />
4434                                 </retrieve>
4435                                 <update permission="ADMIN_SERIAL_STREAM">
4436                                         <context link="stream" jump="distribution" field="holding_lib" />
4437                                 </update>
4438                                 <delete permission="ADMIN_SERIAL_STREAM">
4439                                         <context link="stream" jump="distribution" field="holding_lib" />
4440                                 </delete>
4441                         </actions>
4442                 </permacrud>
4443         </class>
4444
4445         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4446                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4447                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4448                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4449                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4450                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4451                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4452                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4453                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4454                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4455                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4456                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4457                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4458                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4459                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4460                 </fields>
4461                 <links>
4462                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4463                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4464                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4465                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4466                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4467                 </links>
4468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4469                         <actions>
4470                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4471                                         <context link="subscription" field="owning_lib" />
4472                                 </create>
4473                                 <retrieve/>
4474                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4475                                         <context link="subscription" field="owning_lib" />
4476                                 </update>
4477                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4478                                         <context link="subscription" field="owning_lib" />
4479                                 </delete>
4480                         </actions>
4481                 </permacrud>
4482         </class>
4483
4484         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4485                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4486                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4487                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4488                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4489                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4490                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4491                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4492                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4493                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4494                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4495                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4496                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4497                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4498                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4499                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4500                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4501                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4502                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4503                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4504                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4505                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4506                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4507                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4508                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4509                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4510                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4511                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4512                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4513                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4514                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4515                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4516                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4517                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4518                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4519                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4520                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4521                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4522                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4523                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4524                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4525                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4526                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4527                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4528                 </fields>
4529                 <links>
4530                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4531                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4532                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4533                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4534                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4535                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4536                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4537                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4538                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4539                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4540                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4541                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4542                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4543                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4544                 </links>
4545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4546                         <actions>
4547                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4548                                 <retrieve/>
4549                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4550                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4551                         </actions>
4552                 </permacrud>
4553         </class>
4554
4555         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4556                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4557                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4558                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4559                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4560                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4561                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4562                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4563                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4564                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4565                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4566                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4567                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4568                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4569                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4570                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4571                 </fields>
4572                 <links>
4573                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4574                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4575                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4576                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4577                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4578                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4579                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4580                 </links>
4581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4582                         <actions>
4583                                 <create permission="ADMIN_SERIAL_ITEM">
4584                                         <context link="stream" jump="distribution" field="holding_lib" />
4585                                 </create>
4586                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4587                                         <context link="stream" jump="distribution" field="holding_lib" />
4588                                 </retrieve>
4589                                 <update permission="ADMIN_SERIAL_ITEM">
4590                                         <context link="stream" jump="distribution" field="holding_lib" />
4591                                 </update>
4592                                 <delete permission="ADMIN_SERIAL_ITEM">
4593                                         <context link="stream" jump="distribution" field="holding_lib" />
4594                                 </delete>
4595                         </actions>
4596                 </permacrud>
4597         </class>
4598
4599         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4600                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4601                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4602                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4603                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4604                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4605                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4606                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4607                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4608                 </fields>
4609                 <links>
4610                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4611                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4612                 </links>
4613                 <!-- Not available via PCRUD at this time -->
4614         </class>
4615         <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">
4616                 <fields>
4617                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4618                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4619                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4620                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4621                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4622                 </fields>
4623                 <links>
4624                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4625                 </links>
4626         </class>
4627         <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">
4628                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4629                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4630                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4631                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4632                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4633                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4634                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4635                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4636                 </fields>
4637                 <links>
4638                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4639                 </links>
4640         </class>
4641         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
4642                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4643                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4644                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4645                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4646                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4647                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4648                 </fields>
4649                 <links>
4650                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4651                 </links>
4652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4653                         <actions>
4654                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4655                                         <context link="distribution" field="holding_lib" />
4656                                 </create>
4657                                 <retrieve/>
4658                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4659                                         <context link="distribution" field="holding_lib" />
4660                                 </update>
4661                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4662                                         <context link="distribution" field="holding_lib" />
4663                                 </delete>
4664                         </actions>
4665                 </permacrud>
4666         </class>
4667
4668         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
4669                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4670                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4671                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4672                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4673                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4674                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4675                 </fields>
4676                 <links>
4677                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4678                 </links>
4679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4680                         <actions>
4681                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4682                                         <context link="distribution" field="holding_lib" />
4683                                 </create>
4684                                 <retrieve/>
4685                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4686                                         <context link="distribution" field="holding_lib" />
4687                                 </update>
4688                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4689                                         <context link="distribution" field="holding_lib" />
4690                                 </delete>
4691                         </actions>
4692                 </permacrud>
4693         </class>
4694
4695         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
4696                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4697                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4698                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4699                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4700                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4701                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4702                 </fields>
4703                 <links>
4704                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4705                 </links>
4706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4707                         <actions>
4708                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4709                                         <context link="distribution" field="holding_lib" />
4710                                 </create>
4711                                 <retrieve/>
4712                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4713                                         <context link="distribution" field="holding_lib" />
4714                                 </update>
4715                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4716                                         <context link="distribution" field="holding_lib" />
4717                                 </delete>
4718                         </actions>
4719                 </permacrud>
4720         </class>
4721
4722         <class id="ascecm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
4723                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4724                         <field name="id" reporter:datatype="id" />
4725                         <field name="owning_copy" reporter:datatype="link"/>
4726                         <field name="stat_cat" reporter:datatype="link"/>
4727                         <field name="stat_cat_entry" reporter:datatype="link"/>
4728                 </fields>
4729                 <links>
4730                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4731                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4732                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4733                 </links>
4734         </class>
4735         <class id="citm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_type_map" oils_persist:tablename="config.item_type_map" reporter:label="Item Type Map" oils_persist:field_safe="true">
4736                 <fields oils_persist:primary="code">
4737                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4738                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4739                 </fields>
4740                 <links/>
4741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4742             <actions>
4743                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4744                 <retrieve/>
4745                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4746                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4747             </actions>
4748         </permacrud>
4749         </class>
4750         <class id="cblvl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map" oils_persist:field_safe="true">
4751                 <fields oils_persist:primary="code">
4752                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4753                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4754                 </fields>
4755                 <links/>
4756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4757             <actions>
4758                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4759                 <retrieve/>
4760                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4761                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4762             </actions>
4763         </permacrud>
4764         </class>
4765         <class id="sra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="search::relevance_adjustment" oils_persist:tablename="search.relevance_adjustment" reporter:label="Relevance Adjustment">
4766                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4767                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4768                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4769                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4770                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4771                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4772                 </fields>
4773                 <links>
4774             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4775         </links>
4776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4777             <actions>
4778                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4779                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4780                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4781                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4782             </actions>
4783         </permacrud>
4784         </class>
4785         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
4786                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4787                         <field name="id" reporter:datatype="id" />
4788                         <field name="name" reporter:datatype="text"/>
4789                 </fields>
4790                 <links/>
4791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4792             <actions>
4793                 <create permission="CREATE_LASSO" global_required="true"/>
4794                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4795                 <update permission="UPDATE_LASSO" global_required="true"/>
4796                 <delete permission="DELETE_LASSO" global_required="true"/>
4797             </actions>
4798         </permacrud>
4799         </class>
4800         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
4801                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4802                         <field name="id" reporter:datatype="id" />
4803                         <field name="lasso" reporter:datatype="link"/>
4804                         <field name="org_unit" reporter:datatype="org_unit"/>
4805                 </fields>
4806                 <links>
4807                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4808                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4809                 </links>
4810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4811             <actions>
4812                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4813                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4814                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4815                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4816             </actions>
4817         </permacrud>
4818         </class>
4819         <class id="aoup" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity" reporter:label="Org Unit Proximity">
4820                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4821                         <field name="id" reporter:datatype="id" />
4822                         <field name="from_org" reporter:datatype="org_unit"/>
4823                         <field name="to_org" reporter:datatype="org_unit"/>
4824                         <field name="prox" reporter:datatype="int" />
4825                 </fields>
4826                 <links>
4827                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4828                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4829                 </links>
4830         </class>
4831         <class id="ssr" controller="open-ils.cstore" oils_obj:fieldmapper="search::search_result" oils_persist:tablename="search.search_result" oils_persist:readonly="true" reporter:label="Search Result">
4832                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4833                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4834                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4835                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4836                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4837                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4838                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4839                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4840                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4841                 </fields>
4842                 <links/>
4843         </class>
4844         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4845                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4846                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4847                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4848                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4849                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4850                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4851                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4852                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4853                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4854                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4855                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4856                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4857                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4858                 </fields>
4859                 <links>
4860                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4861                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4862                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4863                 </links>
4864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4865             <actions>
4866                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4867                 <retrieve/>
4868                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4869                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4870             </actions>
4871         </permacrud>
4872         </class>
4873         <class id="aoa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_address" oils_persist:tablename="actor.org_address" reporter:label="Org Address">
4874                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4875                         <field name="address_type"  reporter:datatype="text"/>
4876                         <field name="city"  reporter:datatype="text"/>
4877                         <field name="country"  reporter:datatype="text"/>
4878                         <field name="county"  reporter:datatype="text"/>
4879                         <field name="id" reporter:datatype="id" />
4880                         <field name="org_unit" reporter:datatype="org_unit"/>
4881                         <field name="post_code"  reporter:datatype="text"/>
4882                         <field name="state"  reporter:datatype="text"/>
4883                         <field name="street1"  reporter:datatype="text"/>
4884                         <field name="street2"  reporter:datatype="text"/>
4885                         <field name="valid" reporter:datatype="bool"/>
4886                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4887                 </fields>
4888                 <links>
4889                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4890                 </links>
4891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4892             <actions>
4893                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4894                 <retrieve/>
4895                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4896                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4897             </actions>
4898         </permacrud>
4899         </class>
4900         <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">
4901                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
4902                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4903                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4904                         <field name="query_text" reporter:datatype="text"/>
4905                 </fields>
4906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4907             <actions>
4908                 <retrieve/>
4909             </actions>
4910         </permacrud>
4911         </class>
4912
4913         <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">
4914                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
4915                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4916                         <field name="owner" reporter:datatype="org_unit"/>
4917                         <field name="code" reporter:datatype="text"/>
4918                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4919                         <field name="create_date" reporter:datatype="timestamp"/>
4920                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4921                 </fields>
4922                 <links>
4923                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4924                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
4925                 </links>
4926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4927             <actions>
4928                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4929                 <retrieve/>
4930                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4931                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4932             </actions>
4933         </permacrud>
4934         </class>
4935         <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">
4936                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
4937                         <field name="id" reporter:datatype="id"/>
4938                         <field name="grp" reporter:datatype="link"/>
4939                         <field name="pos" reporter:datatype="int"/>
4940                         <field name="query" reporter:datatype="link"/>
4941                 </fields>
4942                 <links>
4943                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
4944                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
4945                 </links>
4946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4947             <actions>
4948                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
4949                     <context link="grp" field="owner"/>
4950                 </create>
4951                 <retrieve/>
4952                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
4953                     <context link="grp" field="owner"/>
4954                 </update>
4955                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
4956                     <context link="grp" field="owner"/>
4957                 </delete>
4958             </actions>
4959         </permacrud>
4960         </class>
4961
4962         <!-- A note: Please update alhr and ahopl when updating ahr -->
4963         <class id="ahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
4964                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4965                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4966                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4967                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4968                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4969                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4970                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4971                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4972                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4973                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4974                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4975                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4976                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4977                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4978                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4979                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
4980                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4981                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4982                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4983                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4984                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4985                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4986                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4987                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4988                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4989                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4990                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4991                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4992                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4993                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4994                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4995                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4996                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4997                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4998                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4999                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5000                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5001                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5002                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5003                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5004                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5005                 </fields>
5006                 <links>
5007                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5008                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5009                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5010                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5011                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5012                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5013                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5014                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5015                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5016                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5017                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5018                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5019                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5020                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5021                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5022                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5023                 </links>
5024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5025                         <actions>
5026                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5027                         </actions>
5028                 </permacrud>
5029         </class>
5030         <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
5031                 <oils_persist:source_definition><![CDATA[
5032                 SELECT
5033                         ahr.*,
5034                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5035                                 copy_location_order_position,
5036                         CASE WHEN au.alias IS NOT NULL THEN
5037                                 au.alias
5038                         ELSE
5039                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5040                                         COALESCE(au.family_name, ''),
5041                                         COALESCE(au.suffix, ''),
5042                                         ', ',
5043                                         COALESCE(au.prefix, ''),
5044                                         COALESCE(au.first_given_name, ''),
5045                                         COALESCE(au.second_given_name, '')
5046                                 ], ' '), E'\\s+,', ',')
5047                         END AS usr_display_name,
5048                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5049                                 AS call_number_label,
5050                         siss.label AS issuance_label,
5051                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5052                         ahcm_1.copy_count AS potential_copies
5053                 FROM action.hold_request ahr
5054                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5055                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5056                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5057                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5058                 JOIN actor.usr au ON (au.id = ahr.usr)
5059                 JOIN (
5060                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5061                         FROM asset.copy_location
5062                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5063                 LEFT JOIN actor.usr_standing_penalty ausp 
5064                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5065                 LEFT JOIN config.standing_penalty csp
5066                         ON (
5067                                 csp.id = ausp.standing_penalty AND 
5068                                 csp.block_list LIKE '%CAPTURE%' AND (
5069                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5070                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5071                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5072                                         )
5073                                 )
5074                         )
5075                 JOIN (
5076                         SELECT COUNT(target_copy) AS copy_count, hold
5077                         FROM action.hold_copy_map
5078                         GROUP BY 2
5079                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5080                 LEFT JOIN serial.issuance siss
5081                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5082                 LEFT JOIN asset.copy_location_order acplo
5083                         ON (acp.location = acplo.location AND
5084                                 acp.circ_lib = acplo.org)
5085                 WHERE
5086                         ahr.capture_time IS NULL AND
5087                         ahr.cancel_time IS NULL AND
5088                         csp.id IS NULL AND
5089                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5090                 ]]></oils_persist:source_definition>
5091                 <fields oils_persist:primary="id">
5092                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5093                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5094                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5095                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5096                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5097                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5098                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5099                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5100                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5101                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5102                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5103                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5104                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5105                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5106                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5107                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5108                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5109                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5110                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5111                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5112                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5113                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5114                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5115                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5116                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5117                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5118                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5119                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5120                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5121                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5122                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5123                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5124                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5125                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5126                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5127                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5128                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5129                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5130                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5131                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5132                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5133                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5134                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5135                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5136                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5137                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5138                 </fields>
5139                 <links>
5140                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5141                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5142                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5143                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5144                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5145                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5146                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5147                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5148                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5149                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5150                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5151                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5152                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5153                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5154                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5155                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5156                 </links>
5157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5158                         <actions>
5159                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5160                         </actions>
5161                 </permacrud>
5162         </class>
5163         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5164                 <oils_persist:source_definition>
5165                         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)
5166                 </oils_persist:source_definition>
5167                 <fields oils_persist:primary="id">
5168                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5169                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5170                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5171                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5172                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5173                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5175                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5176                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5177                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5178                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5179                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5180                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5181                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5182                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5183                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5184                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5185                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5186                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5187                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5188                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5189                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5190                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5191                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5192                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5193                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5194                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5195                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5196                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5197                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5198                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5199                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5200                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5201                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5202                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5203                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5204                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5205                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5206                 </fields>
5207                 <links>
5208                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5209                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5210                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5211                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5212                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5213                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5215                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5216                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5217                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5218                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5219                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5220                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5221                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5222                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5223                 </links>
5224         </class>
5225
5226         <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">
5227                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5228                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5229                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5230                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5231                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5232                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5233                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5234                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5235                 </fields>
5236                 <links>
5237                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5238                 </links>
5239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5240                         <actions>
5241                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5242                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5243                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5244                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5245                         </actions>
5246                 </permacrud>
5247         </class>
5248         <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">
5249                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5250                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5251                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5252                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5253                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5254                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5255                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5256                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5257                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5258                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5259                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5260                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5261                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5263                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5264                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5265                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5266                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5267                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5268                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5269                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5270                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5271                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5272                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5273                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5274                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5275                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5276                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5277                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5278                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5279                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5280                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5281                 </fields>
5282                 <links>
5283                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5284                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5285                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5286                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5287                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5288                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5289                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5290                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5291                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5292                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5293                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5294                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5295                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5296                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5297                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5298                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5299                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5300                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5301                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5302                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5303                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5304                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5305                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5306                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5307                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5308                 </links>
5309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5310             <actions>
5311                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5312                 <retrieve />
5313                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5314                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5315             </actions>
5316         </permacrud>
5317         </class>
5318         <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">
5319                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5320                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5321                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5322                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5323                 </fields>
5324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5325                         <actions>
5326                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5327                                 <retrieve/>
5328                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5329                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5330                         </actions>
5331                 </permacrud>
5332         </class>
5333         <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">
5334                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5335                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5336                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5337                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5338                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5339                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5340                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5341                 </fields>
5342                 <links>
5343                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5344                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5345                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5346                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5347                 </links>
5348                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5349                         <actions>
5350                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5351                                 <retrieve/>
5352                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5353                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5354                         </actions>
5355                 </permacrud>
5356         </class>
5357         <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">
5358                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5359                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5360                         <field name="btype" reporter:datatype="text"/>
5361                         <field name="id" reporter:datatype="id" />
5362                         <field name="name"  reporter:datatype="text"/>
5363                         <field name="description" reporter:datatype="text"/>
5364                         <field name="owner" reporter:datatype="link"/>
5365                         <field name="pub" reporter:datatype="bool"/>
5366                         <field name="create_time" reporter:datatype="timestamp" />
5367                 </fields>
5368                 <links>
5369                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5370                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5371                 </links>
5372         </class>
5373         <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">
5374                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5375                         <field name="id" reporter:datatype="id" />
5376                         <field name="bucket" reporter:datatype="link"/>
5377                         <field name="note" reporter:datatype="text" />
5378                 </fields>
5379                 <links>
5380                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5381                 </links>
5382         </class>
5383         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5384                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5385                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5386                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5387                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5389                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5390                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5391                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5392                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5393                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5394                 </fields>
5395                 <links>
5396                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5397                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5398                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5399                 </links>
5400         </class>
5401         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5402                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5403                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5404                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5405                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5406                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5407                 </fields>
5408                 <links>
5409                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5410                 </links>
5411                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5412                         <actions>
5413                                 <retrieve permission="VIEW_USER">
5414                                         <context link="usr" field="home_ou" />
5415                                 </retrieve>
5416                         </actions>
5417                 </permacrud>
5418         </class>
5419     <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">
5420         <fields oils_persist:primary="field">
5421             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5422             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5423             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5424         </fields>
5425         <links/>
5426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5427             <actions>
5428                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5429                 <retrieve />
5430                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5431                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5432             </actions>
5433         </permacrud>
5434     </class>
5435         <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">
5436                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5437                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5438                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5439                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5440                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5441                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5442                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5443                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5444                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5445                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5446                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5447                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5448                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5449                 </fields>
5450                 <links>
5451                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5452                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5453                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5454                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5455                 </links>
5456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5457             <actions>
5458                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5459                 <retrieve />
5460                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5461                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5462             </actions>
5463         </permacrud>
5464         </class>
5465         <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">
5466                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5467                         <field name="field" reporter:datatype="link"/>
5468                         <field name="id" reporter:datatype="id" />
5469                         <field name="source" reporter:datatype="link"/>
5470                         <field name="value"  reporter:datatype="text"/>
5471                 </fields>
5472                 <links>
5473                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5474                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5475                 </links>
5476         </class>
5477         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5478                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5479                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5480                         <field name="btype" reporter:datatype="text"/>
5481                         <field name="id" reporter:datatype="id" />
5482                         <field name="name"  reporter:datatype="text"/>
5483                         <field name="description" reporter:datatype="text"/>
5484                         <field name="owner" reporter:datatype="link"/>
5485                         <field name="pub" reporter:datatype="bool"/>
5486                         <field name="create_time" reporter:datatype="timestamp" />
5487                 </fields>
5488                 <links>
5489                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5490                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5491                 </links>
5492         </class>
5493         <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">
5494                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5495                         <field name="id" reporter:datatype="id" />
5496                         <field name="bucket" reporter:datatype="link"/>
5497                         <field name="note" reporter:datatype="text" />
5498                 </fields>
5499                 <links>
5500                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5501                 </links>
5502         </class>
5503         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5504                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5505                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5506                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5507                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5508                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5509                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5510                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5511                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5512                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5513                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5514                 </fields>
5515                 <links>
5516                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5517                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5518                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5519                 </links>
5520         </class>
5521         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5522                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5523                         <field name="id" reporter:datatype="id" />
5524                         <field name="ind1" />
5525                         <field name="ind2" />
5526                         <field name="record" />
5527                         <field name="subfield" />
5528                         <field name="tag" />
5529                         <field name="value" />
5530                 </fields>
5531                 <links>
5532                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5533                 </links>
5534         </class>
5535         <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">
5536                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5537                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5538                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5539                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5540                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5541                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5542                 </fields>
5543                 <links>
5544                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5545                 </links>
5546         </class>
5547         <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">
5548                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5549                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5550                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5551                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5552                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5553                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5554                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5555                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5556                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5557                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5558                 </fields>
5559                 <links>
5560                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5561                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5562                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5563                 </links>
5564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5565             <actions>
5566                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5567                 <retrieve/>
5568                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5569                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5570             </actions>
5571         </permacrud>
5572         </class>
5573         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5574                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5575                         <field name="create_date" reporter:datatype="timestamp"/>
5576                         <field name="creator" reporter:datatype="link"/>
5577                         <field name="edit_date" reporter:datatype="timestamp"/>
5578                         <field name="editor" reporter:datatype="link"/>
5579                         <field name="id" reporter:datatype="id" />
5580                         <field name="pub" reporter:datatype="bool"/>
5581                         <field name="record" reporter:datatype="link"/>
5582                         <field name="value"  reporter:datatype="text"/>
5583                 </fields>
5584                 <links>
5585                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5586                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5587                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5588                 </links>
5589         </class>
5590         <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">
5591                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5592                         <field name="balance_owed" reporter:datatype="money" />
5593                         <field name="total_owed" reporter:datatype="money" />
5594                         <field name="total_paid" reporter:datatype="money" />
5595                         <field name="usr" reporter:datatype="link"/>
5596                 </fields>
5597                 <links>
5598                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5599                 </links>
5600         </class>
5601         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5602                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5603                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5604                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5605                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5606                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5607                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5608                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5609                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5610                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5611                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5612                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5613                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5614                 </fields>
5615                 <links>
5616                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5617                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5618                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5619                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5620                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5621                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5622                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5623                 </links>
5624         </class>
5625         <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">
5626                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5627                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5628                         <field name="quality" reporter:datatype="int" />
5629                         <field name="source" reporter:datatype="text"/>
5630                         <field name="transcendant" reporter:datatype="bool"/>
5631                         <field name="can_have_copies" reporter:datatype="bool"/>
5632                 </fields>
5633                 <links/>
5634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5635             <actions>
5636                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5637                 <retrieve/>
5638                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5639                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5640             </actions>
5641         </permacrud>
5642         </class>
5643         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5644                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5645                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5646                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5647                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5648                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5649                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5650                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5651                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5652                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5653                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5654                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5655                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5656                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5657                 </fields>
5658                 <links>
5659                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5660                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5661                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5662                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5663                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5664                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5665                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5666                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5667                 </links>
5668         </class>
5669         <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">
5670                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5671                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5672                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5673                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5674                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5675                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5676                 </fields>
5677                 <links>
5678                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5679                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5680                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5681                 </links>
5682         </class>
5683         <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">
5684                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5685                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5686                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5687                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5688                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5689                 </fields>
5690                 <links>
5691                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5692                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5693                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5694                 </links>
5695         </class>
5696         <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">
5697                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5698                         <field name="bucket" reporter:datatype="link"/>
5699                         <field name="id" reporter:datatype="id" />
5700                         <field name="target_user" reporter:datatype="link"/>
5701                         <field name="create_time" reporter:datatype="timestamp" />
5702                         <field name="pos" reporter:datatype="int" />
5703                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5704                 </fields>
5705                 <links>
5706                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5707                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5708             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5709                 </links>
5710         </class>
5711         <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">
5712                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5713                         <field name="id" reporter:datatype="id" />
5714                         <field name="item" reporter:datatype="link"/>
5715                         <field name="note" reporter:datatype="text" />
5716                 </fields>
5717                 <links>
5718                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5719                 </links>
5720         </class>
5721         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5722                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5723                         <field name="balance_owed" reporter:datatype="money" />
5724                         <field name="total_owed" reporter:datatype="money" />
5725                         <field name="total_paid" reporter:datatype="money" />
5726                         <field name="usr" reporter:datatype="link"/>
5727                 </fields>
5728                 <links>
5729                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5730                 </links>
5731         </class>
5732         <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">
5733                 <fields oils_persist:primary="code" oils_persist:sequence="">
5734                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5735                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5736                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5737                 </fields>
5738                 <links/>
5739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5740             <actions>
5741                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5742                 <retrieve/>
5743                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5744                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5745             </actions>
5746         </permacrud>
5747         </class>
5748         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5749                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5750                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5751                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5752                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5753                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5754                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5755                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5756                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5757                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5758                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5759                 </fields>
5760                 <links>
5761                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5762                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5763                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5764                 </links>
5765         </class>
5766         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5767                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5768                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5769                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5770                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5771                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5772                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5773                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5774                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5775                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5776                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5777                 </fields>
5778                 <links>
5779                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5780                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5781                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5782                 </links>
5783         </class>
5784         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5785                 <fields oils_persist:primary="id" oils_persist:sequence="">
5786                         <field name="checkin_lib" reporter:datatype="link"/>
5787                         <field name="checkin_staff" reporter:datatype="link"/>
5788                         <field name="checkin_time" reporter:datatype="timestamp"/>
5789                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5790                         <field name="circ_staff" reporter:datatype="link"/>
5791                         <field name="desk_renewal" reporter:datatype="bool"/>
5792                         <field name="due_date" reporter:datatype="timestamp"/>
5793                         <field name="duration" reporter:datatype="interval"/>
5794                         <field name="duration_rule" reporter:datatype="link"/>
5795                         <field name="fine_interval" reporter:datatype="interval"/>
5796                         <field name="id" reporter:datatype="id" />
5797                         <field name="max_fine" reporter:datatype="money" />
5798                         <field name="max_fine_rule" reporter:datatype="link"/>
5799                         <field name="opac_renewal" reporter:datatype="bool"/>
5800                         <field name="phone_renewal" reporter:datatype="bool"/>
5801                         <field name="recurring_fine" reporter:datatype="money" />
5802                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5803                         <field name="renewal_remaining" reporter:datatype="int" />
5804             <field name="grace_period" reporter:datatype="interval" />
5805                         <field name="stop_fines" reporter:datatype="text"/>
5806                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5807                         <field name="target_copy" reporter:datatype="link"/>
5808                         <field name="usr" reporter:datatype="link"/>
5809                         <field name="xact_finish" reporter:datatype="timestamp" />
5810                         <field name="xact_start" reporter:datatype="timestamp" />
5811                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5812                 </fields>
5813                 <links>
5814                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5815                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5816                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5817                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5818                 </links>
5819         </class>
5820         <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">
5821                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5822                         <field name="field" reporter:datatype="link"/>
5823                         <field name="id" reporter:datatype="id" />
5824                         <field name="source" reporter:datatype="link"/>
5825                         <field name="value" reporter:datatype="text"/>
5826                 </fields>
5827                 <links>
5828                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5829                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5830                 </links>
5831         </class>
5832         <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">
5833                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5834                         <field name="high" reporter:datatype="money" />
5835                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5836                         <field name="low" reporter:datatype="money" />
5837                         <field name="name" reporter:datatype="text"/>
5838                         <field name="normal" reporter:datatype="money" />
5839                         <field name="recurrence_interval" reporter:datatype="interval"/>
5840             <field name="grace_period" reporter:datatype="interval" />
5841                 </fields>
5842                 <links/>
5843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5844             <actions>
5845                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5846                 <retrieve/>
5847                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5848                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5849             </actions>
5850         </permacrud>
5851         </class>
5852         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5853                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5854                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5855                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5856                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5857                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5858                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5859                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5860                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5861                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5862                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5863                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5864                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5865                 </fields>
5866                 <links>
5867                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5868                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5869                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5870                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5871                 </links>
5872         </class>
5873         <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">
5874                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5875                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5876                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5877                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5878                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5879                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5880                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5881                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5882                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5883                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5884                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5885                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5886                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5887                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5888                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5889                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5890                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5891                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5892                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5893                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5894                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5895                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5896                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5897                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5898                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5899                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5900                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5901                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5902                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5903                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5904                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5905                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5906                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5907                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5908                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5909                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5910                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5911                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5912                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5913                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5914                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5915                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5916                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5917                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5918                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5919                 </fields>
5920                 <links>
5921                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5922                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5923                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5924                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5925                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5926                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5927                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5928                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5929                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5930                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5931                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5932                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5933                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5934                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5935                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5936                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5937                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5938                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5939                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5940                 </links>
5941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5942             <actions>
5943                 <create permission="CREATE_COPY">
5944                     <context link="call_number" field="owning_lib"/>
5945                 </create>
5946                 <retrieve/>
5947                 <update permission="UPDATE_COPY">
5948                     <context link="call_number" field="owning_lib"/>
5949                 </update>
5950                 <delete permission="DELETE_COPY">
5951                     <context link="call_number" field="owning_lib"/>
5952                 </delete>
5953             </actions>
5954         </permacrud>
5955         </class>
5956
5957         <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">
5958                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5959                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5960                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5961                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5962                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5963                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5964                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5965                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5966                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5967                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5968                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5969                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5970                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5971                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5972                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5973                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5974                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5975                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5976                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5977                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5978                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5979                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5980                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5981                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5982                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5983                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5984                 </fields>
5985                 <links>
5986                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5987                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5988                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5989                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5990                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5991                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5992                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5993                 </links>
5994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5995                         <actions>
5996                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5997                                 <retrieve />
5998                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5999                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6000                         </actions>
6001                 </permacrud>
6002         </class>
6003
6004         <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">
6005                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6006                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6007                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6008                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6009                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6010                 </fields>
6011                 <links/>
6012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6013             <actions>
6014                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6015                 <retrieve/>
6016                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6017                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6018             </actions>
6019         </permacrud>
6020         </class>
6021         <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">
6022                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6023                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6024                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6025                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6026                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6027                 </fields>
6028                 <links/>
6029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6030             <actions>
6031                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6032                 <retrieve/>
6033                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6034                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6035             </actions>
6036         </permacrud>
6037         </class>
6038         <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">
6039                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6040                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6041                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6042                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6043                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6044                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6045                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6046                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6047                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6048                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6049                 </fields>
6050                 <links>
6051                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6052                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6053                 </links>
6054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6055             <actions>
6056                 <create permission="CREATE_PERM" global_required="true"/>
6057                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6058                 <update permission="UPDATE_PERM" global_required="true"/>
6059                 <delete permission="DELETE_PERM" global_required="true"/>
6060             </actions>
6061         </permacrud>
6062         </class>
6063         <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">
6064                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6065                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6066                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6067                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6068                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6069                 </fields>
6070                 <links>
6071                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6072                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6073                 </links>
6074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6075             <actions>
6076                 <create permission="ADMIN_SURVEY">
6077                     <context link="question" jump="survey" field="owner"/>
6078                 </create>
6079                 <retrieve/>
6080                 <update permission="ADMIN_SURVEY">
6081                     <context link="question" jump="survey" field="owner"/>
6082                 </update>
6083                 <delete permission="ADMIN_SURVEY">
6084                     <context link="question" jump="survey" field="owner"/>
6085                 </delete>
6086             </actions>
6087         </permacrud>
6088         </class>
6089         <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">
6090                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6091                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6092                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6093                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6094                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6095                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6096                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6097                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6098                 </fields>
6099                 <links>
6100                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6101                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6102                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6103                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6104                 </links>
6105         </class>
6106         <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">
6107                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6108                         <field name="balance_owed" reporter:datatype="money" />
6109                         <field name="total_owed" reporter:datatype="money" />
6110                         <field name="total_paid" reporter:datatype="money" />
6111                         <field name="usr" reporter:datatype="link"/>
6112                 </fields>
6113                 <links>
6114                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6115                 </links>
6116         </class>
6117         <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">
6118                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6119                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6120                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6121                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6122                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6123                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6124                 </fields>
6125                 <links>
6126                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6127                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6128                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6129                 </links>
6130         </class>
6131         <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">
6132                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6133                         <field name="field" reporter:datatype="link"/>
6134                         <field name="id" reporter:datatype="id" />
6135                         <field name="source" reporter:datatype="link"/>
6136                         <field name="value" reporter:datatype="text"/>
6137                 </fields>
6138                 <links>
6139                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6140                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6141                 </links>
6142         </class>
6143         <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">
6144                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6145                         <field name="field" reporter:datatype="link"/>
6146                         <field name="id" reporter:datatype="id" />
6147                         <field name="source" reporter:datatype="link"/>
6148                         <field name="value" reporter:datatype="text"/>
6149                 </fields>
6150                 <links>
6151                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6152                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6153                 </links>
6154         </class>
6155         <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">
6156                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6157                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6158                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6159                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6160                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6161                 </fields>
6162                 <links>
6163                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6164                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6165                 </links>
6166         </class>
6167         <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">
6168                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6169                         <field name="depth" reporter:datatype="int" />
6170                         <field name="grantable" reporter:datatype="bool"/>
6171                         <field name="grp" reporter:datatype="link"/>
6172                         <field name="id" reporter:datatype="id" />
6173                         <field name="perm" reporter:datatype="link"/>
6174                 </fields>
6175                 <links>
6176                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6177                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6178                 </links>
6179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6180             <actions>
6181                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6182                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6183                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6184                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6185             </actions>
6186         </permacrud>
6187         </class>
6188         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6189                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6190                         <field name="items" oils_persist:virtual="true" />
6191                         <field name="btype" reporter:datatype="text"/>
6192                         <field name="id" reporter:datatype="id" />
6193                         <field name="name" reporter:datatype="text"/>
6194                         <field name="description" reporter:datatype="text"/>
6195                         <field name="owner" reporter:datatype="link"/>
6196                         <field name="pub" reporter:datatype="bool"/>
6197                         <field name="create_time" reporter:datatype="timestamp" />
6198                 </fields>
6199                 <links>
6200                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6201                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6202                 </links>
6203         </class>
6204         <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">
6205                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6206                         <field name="id" reporter:datatype="id" />
6207                         <field name="bucket" reporter:datatype="link"/>
6208                         <field name="note" reporter:datatype="text" />
6209                 </fields>
6210                 <links>
6211                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6212                 </links>
6213         </class>
6214         <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">
6215                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6216                         <field name="id" reporter:datatype="int" />
6217                         <field name="usr" reporter:datatype="link"/>
6218                         <field name="work_ou" reporter:datatype="link"/>
6219                 </fields>
6220                 <links>
6221                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6222                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6223                 </links>
6224         </class>
6225         <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">
6226                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6227                         <field name="depth" reporter:datatype="int"/>
6228                         <field name="grantable" reporter:datatype="bool"/>
6229                         <field name="id" reporter:datatype="id" />
6230                         <field name="perm" reporter:datatype="link"/>
6231                         <field name="usr" reporter:datatype="link"/>
6232                 </fields>
6233                 <links>
6234                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6235                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6236                 </links>
6237         </class>
6238         <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">
6239                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6240                         <field name="object_id" reporter:datatype="text"/>
6241                         <field name="grantable" reporter:datatype="bool"/>
6242                         <field name="id" reporter:datatype="id" />
6243                         <field name="perm" reporter:datatype="link"/>
6244                         <field name="usr" reporter:datatype="link"/>
6245                         <field name="object_type" reporter:datatype="text"/>
6246                 </fields>
6247                 <links>
6248                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6249                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6250                 </links>
6251         </class>
6252         <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">
6253                 <fields oils_persist:primary="id" oils_persist:sequence="">
6254                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6255                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6256                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6257                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6258                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6259                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6260                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6261                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6262                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6263                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6264                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6265                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6266                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6267                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6268                 </fields>
6269                 <links>
6270                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6271                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6272                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6273                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6274                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6275                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6276                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6277                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6278                 </links>
6279         </class>
6280         <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">
6281                 <fields oils_persist:primary="id" oils_persist:sequence="">
6282                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6283                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6284                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6285                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6286                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6287                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6288                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6289                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6290                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6291                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6292                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6293                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6294                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6295                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6296                 </fields>
6297                 <links>
6298                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6299                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6300                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6301                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6302                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6303                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6304                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6305                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6306                 </links>
6307         </class>
6308         <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">
6309                 <fields oils_persist:primary="id" oils_persist:sequence="">
6310                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6311                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6312                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6313                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6314                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6315                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6316                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6317                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6318                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6319                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6320                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6321                 </fields>
6322                 <links>
6323                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6324                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6325                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6326                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6327                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6328                 </links>
6329         </class>
6330         <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">
6331                 <fields oils_persist:primary="id" oils_persist:sequence="">
6332                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6333                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6334                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6335                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6336                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6337                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6338                         <field reporter:label="Accepting User" name="accepting_usr" />
6339                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6340                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6341                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6342                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6343                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6344                 </fields>
6345                 <links>
6346                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6347                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6348                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6349                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6350                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6351                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6352                 </links>
6353         </class>
6354         <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">
6355                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6356                         <field name="bucket" reporter:datatype="link"/>
6357                         <field name="id" reporter:datatype="id" />
6358                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6359                         <field name="create_time" reporter:datatype="timestamp" />
6360                         <field name="pos" reporter:datatype="int" />
6361                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6362                 </fields>
6363                 <links>
6364                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6365                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6366             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6367                 </links>
6368         </class>
6369         <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">
6370                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6371                         <field name="id" reporter:datatype="id" />
6372                         <field name="item" reporter:datatype="link"/>
6373                         <field name="note" reporter:datatype="text" />
6374                 </fields>
6375                 <links>
6376                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6377                 </links>
6378         </class>
6379         <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">
6380                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6381                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6382                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6383                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6384                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6385                 </fields>
6386                 <links>
6387                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6388                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6389                 </links>
6390         </class>
6391     <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">
6392         <fields oils_persist:primary="field">
6393             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6394             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6395             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6396         </fields>
6397         <links/>
6398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6399             <actions>
6400                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6401                 <retrieve />
6402                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6403                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6404             </actions>
6405         </permacrud>
6406     </class>
6407         <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">
6408                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6409                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6410                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6411                 </fields>
6412                 <links/>
6413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6414             <actions>
6415                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6416                 <retrieve/>
6417                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6418                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6419             </actions>
6420         </permacrud>
6421         </class>
6422
6423
6424         <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">
6425                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6426                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6427                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6428                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6429                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6430                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6431                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6432                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6433                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6434                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6435                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6436                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6437                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6438                 </fields>
6439                 <links>
6440                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6441                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6442                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6443                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6444                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6445                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6446                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6447                 </links>
6448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6449             <actions>
6450                 <create permission="TRANSIT_COPY">
6451                     <context link="target_copy" field="owner"/>
6452                 </create>
6453                 <retrieve/>
6454                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6455                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6456             </actions>
6457         </permacrud>
6458         </class>
6459         <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">
6460                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6461                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6462                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6463                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6464                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6465                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6466                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6467                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6468                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6469                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6470                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6471                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6472                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6473                 </fields>
6474                 <links>
6475                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6476                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6477                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6478                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6479                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6480                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6481                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6482                 </links>
6483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6484             <actions>
6485                 <create permission="TRANSIT_COPY" context_field="owner">
6486                     <context link="target_copy" field="circ_lib"/>
6487                 </create>
6488                 <retrieve/>
6489                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6490                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6491             </actions>
6492         </permacrud>
6493         </class>
6494         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6495                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6496                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6497                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6498                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6499                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6500                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6501                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6502                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6503                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6504                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6505                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6506                 </fields>
6507                 <links>
6508                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6509                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6510                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6511                 </links>
6512         </class>
6513         <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">
6514                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6515                         <field name="grp" />
6516                         <field name="id" reporter:datatype="id" />
6517                         <field name="usr" />
6518                 </fields>
6519                 <links>
6520                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6521                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6522                 </links>
6523         </class>
6524         <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">
6525                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6526                         <field name="id" reporter:datatype="id" />
6527                         <field name="fq_field" reporter:datatype="text"/>
6528                         <field name="identity_value" reporter:datatype="text"/>
6529                         <field name="translation" reporter:datatype="text"/>
6530                         <field name="string" reporter:datatype="text"/>
6531                 </fields>
6532                 <links>
6533                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6534                 </links>
6535         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6536             <actions>
6537                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6538                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6539                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6540                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6541             </actions>
6542         </permacrud>
6543         </class>
6544         <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">
6545                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6546                         <field name="id" reporter:datatype="id" />
6547                         <field name="fm_class" reporter:datatype="text"/>
6548                         <field name="field" reporter:datatype="text"/>
6549                         <field name="owner" reporter:datatype="org_unit"/>
6550                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6551                 </fields>
6552                 <links>
6553                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6554                 </links>
6555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6556             <actions>
6557                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6558                 <retrieve/>
6559                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6560                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6561             </actions>
6562         </permacrud>
6563         </class>
6564         <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">
6565                 <fields oils_persist:primary="code">
6566                         <field name="code" reporter:datatype="id" />
6567                         <field name="marc_code" reporter:datatype="text"/>
6568                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6569                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6570                 </fields>
6571                 <links/>
6572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6573             <actions>
6574                 <create permission="CREATE_LOCALE" global_required="true"/>
6575                 <retrieve/>
6576                 <update permission="UPDATE_LOCALE" global_required="true"/>
6577                 <delete permission="DELETE_LOCALE" global_required="true"/>
6578             </actions>
6579         </permacrud>
6580         </class>
6581         <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">
6582                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6583                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6584                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6585                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6586             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6587                 </fields>
6588                 <links>
6589                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6590                 </links>
6591         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6592             <actions>
6593                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6594                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6595                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6596                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6597             </actions>
6598         </permacrud>
6599         </class>
6600
6601         <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">
6602                 <fields oils_persist:primary="id">
6603                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6604                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6605                 </fields>
6606                 <links/>
6607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6608             <actions>
6609                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6610                 <retrieve/>
6611                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6612                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6613             </actions>
6614         </permacrud>
6615         </class>
6616
6617         <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">
6618                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6619                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6620                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6621                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6622                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6623                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6624                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6625                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6626                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6627                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6628                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6629                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6630                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6631                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6632                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6633                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6634                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6635                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6636                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6637                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6638                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6639                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6640                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6641                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6642                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6643                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6644                 </fields>
6645                 <links>
6646                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6647                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6648                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6649                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6650                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6651                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6652                 </links>
6653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6654             <actions>
6655                 <create permission="user_request.create">
6656                     <context link="usr" field="home_ou"/>
6657                                 </create>
6658                 <retrieve permission="user_request.view">
6659                     <context link="usr" field="home_ou"/>
6660                                 </retrieve>
6661                 <update permission="user_request.update">
6662                     <context link="usr" field="home_ou"/>
6663                                 </update>
6664                 <delete permission="user_request.delete">
6665                     <context link="usr" field="home_ou"/>
6666                                 </delete>
6667             </actions>
6668         </permacrud>
6669         </class>
6670
6671         <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">
6672                 <fields oils_persist:primary="code">
6673                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6674                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6675                 </fields>
6676                 <links/>
6677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6678             <actions>
6679                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6680                 <retrieve/>
6681                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6682                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6683             </actions>
6684         </permacrud>
6685         </class>
6686
6687         <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">
6688                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6689                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6690                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6691                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6692                         <field reporter:label="Ratio" name="ratio" />
6693                 </fields>
6694                 <links>
6695                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6696                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6697                 </links>
6698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6699                         <actions>
6700                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6701                                 <retrieve/>
6702                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6703                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6704                         </actions>
6705                 </permacrud>
6706         </class>
6707
6708         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6709                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6710                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6711                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6712                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6713                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6714                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6715                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6716                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6717                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6718                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6719                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6720                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6721                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6722                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6723                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6724                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6725                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6726                 </fields>
6727                 <links>
6728                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6730             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6731             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6732             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6733                 </links>
6734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6735             <actions>
6736                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6737                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6738                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6739                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6740             </actions>
6741         </permacrud>
6742         </class>
6743
6744         <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">
6745                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6746                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6747                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6748                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6749                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6750                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6751                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6752                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6753                 </fields>
6754                 <links>
6755                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6756                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6757                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6758                 </links>
6759         </class>
6760
6761         <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">
6762                 <fields oils_persist:primary="code">
6763                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6764                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6765                 </fields>
6766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6767             <actions>
6768                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6769                 <retrieve/>
6770                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6771                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6772             </actions>
6773                 </permacrud>
6774         </class>
6775
6776         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6777                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6778                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6779                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6780                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6781                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6782                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6783                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6784                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6785                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6786                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6787                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6788                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6789                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6790                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6791                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6792                 </fields>
6793                 <links>
6794                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6795                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6796                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6797                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6798                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6799                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6800                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6801                 </links>
6802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6803             <actions>
6804                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6805                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6806                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6807                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6808             </actions>
6809         </permacrud>
6810         </class>
6811
6812         <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">
6813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6814                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6815                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6816                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6817                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6818                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6819                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6820                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6821                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6822                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6823                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6824                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6825                 </fields>
6826                 <links>
6827                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6828                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6829                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6830                 </links>
6831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6832             <actions>
6833                 <create   permission="ADMIN_INVOICE">
6834                                         <context link="invoice" field="receiver"/>
6835                                 </create>
6836                 <retrieve permission="ADMIN_INVOICE">
6837                                         <context link="invoice" field="receiver"/>
6838                                 </retrieve>
6839                 <update   permission="ADMIN_INVOICE">
6840                                         <context link="invoice" field="receiver"/>
6841                                 </update>
6842                                 <delete   permission="ADMIN_INVOICE">
6843                                         <context link="invoice" field="receiver"/>
6844                                 </delete>
6845             </actions>
6846         </permacrud>
6847         </class>
6848
6849         <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">
6850                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6851                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6852                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6853                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6854                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6855                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6856                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6857                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6858                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6859                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6860                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6861                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6862                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6863                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6864                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6865                 </fields>
6866                 <links>
6867                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6868                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6869                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6870                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6871                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6872                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6873                 </links>
6874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6875             <actions>
6876                 <create   permission="ADMIN_INVOICE">
6877                                         <context link="invoice" field="receiver"/>
6878                                 </create>
6879                 <retrieve permission="ADMIN_INVOICE">
6880                                         <context link="invoice" field="receiver"/>
6881                                 </retrieve>
6882                 <update   permission="ADMIN_INVOICE">
6883                                         <context link="invoice" field="receiver"/>
6884                                 </update>
6885                                 <delete   permission="ADMIN_INVOICE">
6886                                         <context link="invoice" field="receiver"/>
6887                                 </delete>
6888             </actions>
6889         </permacrud>
6890         </class>
6891
6892         <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">
6893                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6894                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6895                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6896                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6897                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6899                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6900                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6901                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6902                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6903                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6904                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6905                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6906                 </fields>
6907                 <links>
6908                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6909                 </links>
6910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6911             <actions>
6912                 <create permission="ADMIN_PROVIDER">
6913                     <context link="provider" field="owner"/>
6914                 </create>
6915                 <retrieve permission="ADMIN_PROVIDER">
6916                     <context link="provider" field="owner"/>
6917                 </retrieve>
6918                 <update permission="ADMIN_PROVIDER">
6919                     <context link="provider" field="owner"/>
6920                 </update>
6921                 <delete permission="ADMIN_PROVIDER">
6922                     <context link="provider" field="owner"/>
6923                 </delete>
6924             </actions>
6925         </permacrud>
6926         </class>
6927
6928         <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">
6929                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6930                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6931                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6932                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6933                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6934                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6935                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6936         </fields>
6937                 <links>
6938                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6939                 </links>
6940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6941             <actions>
6942                 <create permission="ADMIN_PROVIDER">
6943                     <context link="provider" field="owner"/>
6944                 </create>
6945                 <retrieve permission="ADMIN_PROVIDER">
6946                     <context link="provider" field="owner"/>
6947                 </retrieve>
6948                 <update permission="ADMIN_PROVIDER">
6949                     <context link="provider" field="owner"/>
6950                 </update>
6951                 <delete permission="ADMIN_PROVIDER">
6952                     <context link="provider" field="owner"/>
6953                 </delete>
6954             </actions>
6955         </permacrud>
6956     </class>
6957         <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">
6958                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6959                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6960                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6961                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6962                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6963                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6964                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6965                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6966                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6967                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6968                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6969                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6970                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6971                 </fields>
6972                 <links>
6973                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6974                 </links>
6975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6976             <actions>
6977                 <create permission="ADMIN_PROVIDER">
6978                     <context link="contact" jump='provider' field="owner"/>
6979                 </create>
6980                 <retrieve permission="ADMIN_PROVIDER">
6981                     <context link="contact" jump='provider' field="owner"/>
6982                 </retrieve>
6983                 <update permission="ADMIN_PROVIDER">
6984                     <context link="contact" jump='provider' field="owner"/>
6985                 </update>
6986                 <delete permission="ADMIN_PROVIDER">
6987                     <context link="contact" jump='provider' field="owner"/>
6988                 </delete>
6989             </actions>
6990         </permacrud>
6991         </class>
6992
6993         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6994                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6995                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6996                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6997                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6998                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6999                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7000                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7001                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7002                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7003                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7004                 </fields>
7005                 <links>
7006                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7007                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7008                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7009                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7010                 </links>
7011         </class>
7012
7013         <class id="acqfc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
7014                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7015                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7016                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7017                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7018                 </fields>
7019                 <links>
7020             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7021                 </links>
7022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7023                         <actions>
7024                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7025                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7026                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7027                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7028                         </actions>
7029                 </permacrud>
7030         </class>
7031
7032         <class id="acqfy" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
7033                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7034                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7035                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7036                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7037                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7038                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7039                 </fields>
7040                 <links>
7041                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7042                 </links>
7043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7044                         <actions>
7045                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7046                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7047                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7048                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7049                         </actions>
7050                 </permacrud>
7051         </class>
7052
7053         <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">
7054                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7055                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7056                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7057                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7058                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7059                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7060                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7061                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7063                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7064                 </fields>
7065                 <links>
7066                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7067                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7068             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7069             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7070                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7071                 </links>
7072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7073             <actions>
7074                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7075                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7076                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7077                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7078             </actions>
7079         </permacrud>
7080         </class>
7081
7082         <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">
7083                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7084                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7085                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7086                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7087                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7088                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7089                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7090                 </fields>
7091                 <links>
7092                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7093                 </links>
7094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7095                         <actions>
7096                                 <create permission="ADMIN_FUNDING_SOURCE">
7097                     <context link="funding_source" field="owner"/>
7098                 </create>
7099                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7100                     <context link="funding_source" field="owner"/>
7101                 </retrieve>
7102                                 <update permission="ADMIN_FUNDING_SOURCE">
7103                     <context link="funding_source" field="owner"/>
7104                 </update>
7105                                 <delete permission="ADMIN_FUNDING_SOURCE">
7106                     <context link="funding_source" field="owner"/>
7107                 </delete>
7108                         </actions>
7109                 </permacrud>
7110         </class>
7111
7112         <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">
7113                 <fields oils_persist:primary="id">
7114                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7115                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7116                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7117                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7118                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7119                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7120                 </fields>
7121                 <links>
7122                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7123                 </links>
7124         </class>
7125
7126         <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">
7127                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7128                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7129                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7130                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7131                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7132                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7133                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7134                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7135                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7136                 </fields>
7137                 <links>
7138                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7139                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7140                 </links>
7141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7142                         <actions>
7143                                 <create permission="ADMIN_ACQ_FUND">
7144                     <context link="fund" field="org"/>
7145                 </create>
7146                                 <retrieve permission="ADMIN_ACQ_FUND">
7147                     <context link="fund" field="org"/>
7148                 </retrieve>
7149                                 <update permission="ADMIN_ACQ_FUND">
7150                     <context link="fund" field="org"/>
7151                 </update>
7152                                 <delete permission="ADMIN_ACQ_FUND">
7153                     <context link="fund" field="org"/>
7154                 </delete>
7155                         </actions>
7156                 </permacrud>
7157         </class>
7158
7159         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7160                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7161                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7162                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7163                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7164                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7165                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7166                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7167                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7168                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7169                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7170                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7171                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7172                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7173                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7174                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7175                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7176                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7177                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7178                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7179                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7180                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7181                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7182                 </fields>
7183                 <links>
7184                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7185                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7186             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7187             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7188             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7189             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7190             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7191             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7192             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7193             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7194             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7195                 </links>
7196         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7197             <actions>
7198                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7199                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7200                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7201                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7202             </actions>
7203         </permacrud>
7204         </class>
7205
7206         <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">
7207                 <fields oils_persist:primary="fund">
7208                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7209                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7210                 </fields>
7211                 <links>
7212                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7213                 </links>
7214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7215             <actions>
7216                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7217                                         <context link="fund" field="org" />
7218                 </retrieve>
7219             </actions>
7220         </permacrud>
7221         </class>
7222
7223         <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">
7224                 <fields oils_persist:primary="fund">
7225                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7226                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7227                 </fields>
7228                 <links>
7229                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7230                 </links>
7231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7232             <actions>
7233                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7234                                         <context link="fund" field="org" />
7235                 </retrieve>
7236             </actions>
7237         </permacrud>
7238         </class>
7239
7240         <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">
7241                 <fields oils_persist:primary="fund">
7242                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7243                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7244                 </fields>
7245                 <links>
7246                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7247                 </links>
7248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7249             <actions>
7250                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7251                                         <context link="fund" field="org" />
7252                 </retrieve>
7253             </actions>
7254         </permacrud>
7255         </class>
7256
7257         <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">
7258                 <fields oils_persist:primary="fund">
7259                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7260                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7261                 </fields>
7262                 <links>
7263                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7264                 </links>
7265         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7266             <actions>
7267                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7268                                         <context link="fund" field="org" />
7269                 </retrieve>
7270             </actions>
7271         </permacrud>
7272         </class>
7273
7274         <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">
7275                 <fields oils_persist:primary="fund">
7276                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7277                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7278                 </fields>
7279                 <links>
7280                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7281                 </links>
7282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7283             <actions>
7284                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7285                                         <context link="fund" field="org" />
7286                 </retrieve>
7287             </actions>
7288         </permacrud>
7289         </class>
7290
7291    <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">
7292         <fields oils_persist:primary="fund">
7293             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7294             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7295         </fields>
7296         <links>
7297             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7298         </links>
7299     </class>
7300
7301    <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">
7302         <fields oils_persist:primary="fund">
7303             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7304             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7305         </fields>
7306         <links>
7307             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7308         </links>
7309     </class>
7310
7311    <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">
7312         <fields oils_persist:primary="fund">
7313             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7314             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7315         </fields>
7316         <links>
7317             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7318         </links>
7319     </class>
7320
7321    <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">
7322         <fields oils_persist:primary="fund">
7323             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7324             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7325         </fields>
7326         <links>
7327             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7328         </links>
7329     </class>
7330
7331    <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">
7332         <fields oils_persist:primary="fund">
7333             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7334             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7335         </fields>
7336         <links>
7337             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7338         </links>
7339     </class>
7340
7341         <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">
7342                 <fields oils_persist:primary="funding_source">
7343                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7344                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7345                 </fields>
7346                 <links>
7347                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7348                 </links>
7349         </class>
7350
7351         <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">
7352                 <fields oils_persist:primary="funding_source">
7353                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7354                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7355                 </fields>
7356                 <links>
7357                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7358                 </links>
7359         </class>
7360
7361         <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">
7362                 <fields oils_persist:primary="funding_source">
7363                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7364                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7365                 </fields>
7366                 <links>
7367                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7368                 </links>
7369         </class>
7370
7371         <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">
7372                 <fields oils_persist:primary="fund">
7373                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7374                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7375                 </fields>
7376                 <links>
7377                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7378                 </links>
7379         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7380             <actions>
7381                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7382                                         <context link="fund" field="org" />
7383                 </retrieve>
7384             </actions>
7385         </permacrud>
7386     </class>
7387     <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">
7388         <oils_persist:source_definition><![CDATA[
7389             SELECT
7390                 acqf.*,
7391                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7392                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7393                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7394                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7395             FROM
7396                 acq.fund acqf
7397                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7398                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7399                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7400                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7401         ]]></oils_persist:source_definition>
7402         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7403             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7404             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7405             <field reporter:label="Name" name="name" reporter:datatype="text" />
7406             <field reporter:label="Year" name="year" reporter:datatype="int" />
7407             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7408             <field reporter:label="Code" name="code" reporter:datatype="text" />
7409             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7410             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7411             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7412             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7413             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7414
7415             <!-- non fund-native fields -->
7416             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7417             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7418             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7419             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7420         </fields>
7421         <links>
7422             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7423             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7424             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7425         </links>
7426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7427             <actions>
7428                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7429             </actions>
7430         </permacrud>
7431         </class>
7432         <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">
7433                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7434                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7435                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7436                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7437                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7438                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7439                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7440                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7441                 </fields>
7442                 <links>
7443                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7444                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7445                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7446                 </links>
7447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7448                         <actions>
7449                                 <create permission="ADMIN_ACQ_FUND">
7450                     <context link="fund" field="org"/>
7451                 </create>
7452                                 <retrieve permission="ADMIN_ACQ_FUND">
7453                     <context link="fund" field="org"/>
7454                 </retrieve>
7455                                 <update permission="ADMIN_ACQ_FUND">
7456                     <context link="fund" field="org"/>
7457                 </update>
7458                                 <delete permission="ADMIN_ACQ_FUND">
7459                     <context link="fund" field="org"/>
7460                 </delete>
7461                         </actions>
7462                 </permacrud>
7463         </class>
7464
7465     <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">
7466         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7467             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7468             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7469             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7470             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7471             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7472             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7473             <field reporter:label="Note" name="note" reporter:datatype="text" />
7474             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7475         </fields>
7476         <links>
7477             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7478             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7479             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7480         </links>
7481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7482                         <actions>
7483                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7484                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7485                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7486                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7487                         </actions>
7488                 </permacrud>
7489     </class>
7490
7491         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7492                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7493                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7494                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7495                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7496                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7497                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7498                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7499                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7500                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7501                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7502                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7503                 </fields>
7504                 <links>
7505                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7506                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7507                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7508                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7509                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7510                 </links>
7511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7512                         <actions>
7513                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7514                         </actions>
7515                 </permacrud>
7516         </class>
7517
7518         <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">
7519                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7520                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7521                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7522                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7523                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7524                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7525                 </fields>
7526                 <links>
7527                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7528                 </links>
7529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7530                         <actions>
7531                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7532                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7533                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7534                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7535                         </actions>
7536                 </permacrud>
7537         </class>
7538
7539         <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">
7540                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7541                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7542                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7543                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7544                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7545                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7546                         <field reporter:label="State" name="state" reporter:datatype="text" />
7547                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7548                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7549                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7550                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7551                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7552                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7553                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7554                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7555                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7556                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7557                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7558                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7559                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7560                 </fields>
7561                 <links>
7562                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7563                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7564                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7565                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7566                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7567                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7568                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7569                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7570                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7571                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7572                 </links>
7573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7574                         <actions>
7575                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7576                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7577                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7578                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7579                         </actions>
7580                 </permacrud>
7581         </class>
7582
7583         <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">
7584                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7585                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7586                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7587                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7588                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7589                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7590                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7591                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7592                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7593                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7594                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7595                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7596                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7597                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7598                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7599                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7600                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7601                 </fields>
7602                 <links>
7603                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7604                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7605                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7606                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7607                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7608                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7609                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7610                 </links>
7611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7612             <actions>
7613                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7614             </actions>
7615                 </permacrud>
7616         </class>
7617
7618         <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">
7619                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7620                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7621                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7622                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7623                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7624                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7625                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7626                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7627                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7628                 </fields>
7629                 <links>
7630                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7631                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7632                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7633                 </links>
7634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7635             <actions>
7636                 <create permission="CREATE_PURCHASE_ORDER">
7637                     <context link="purchase_order" field="ordering_agency"/>
7638                 </create>
7639                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7640                     <context link="purchase_order" field="ordering_agency"/>
7641                 </retrieve>
7642                 <update permission="CREATE_PURCHASE_ORDER">
7643                     <context link="purchase_order" field="ordering_agency"/>
7644                 </update>
7645                 <delete permission="CREATE_PURCHASE_ORDER">
7646                     <context link="purchase_order" field="ordering_agency"/>
7647                 </delete>
7648             </actions>
7649                 </permacrud>
7650         </class>
7651
7652         <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">
7653                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7654                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7655                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7656                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7657                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7658                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7659                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7660                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7661                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7662                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7663                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7664                 </fields>
7665                 <links>
7666                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7667                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7668                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7669                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7670                 </links>
7671                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7672             <actions>
7673                 <create permission="CREATE_PURCHASE_ORDER">
7674                     <context link="purchase_order" field="ordering_agency"/>
7675                 </create>
7676                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7677                     <context link="purchase_order" field="ordering_agency"/>
7678                 </retrieve>
7679                 <update permission="CREATE_PURCHASE_ORDER">
7680                     <context link="purchase_order" field="ordering_agency"/>
7681                 </update>
7682                 <delete permission="CREATE_PURCHASE_ORDER">
7683                     <context link="purchase_order" field="ordering_agency"/>
7684                 </delete>
7685             </actions>
7686                 </permacrud>
7687         </class>
7688
7689         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7690                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7691                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7692                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7693                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7694                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7695                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7696                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7697                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7698                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7699                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7700                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7701                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7702                         <field reporter:label="State" name="state" reporter:datatype="text" />
7703                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7704                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7705                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7706                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7707                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7708                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7709                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7710                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7711                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7712                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7713                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7714                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7715                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7716                 </fields>
7717                 <links>
7718                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7719                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7720                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7721                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7722                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7723                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7724                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7725                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7726                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7727                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7728                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7729                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7730                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7731                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7732                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7733                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7734                 </links>
7735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7736                         <actions>
7737                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7738                                         <context link="purchase_order" field="ordering_agency"/>
7739                                         <context link="picklist" field="org_unit"/>
7740                                 </retrieve>
7741                         </actions>
7742                 </permacrud>
7743         </class>
7744
7745         <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">
7746                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7747                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7748                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7749                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7750                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7751                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7752                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7753                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7754                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7755                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7756                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7757                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7758                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7759                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7760                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7761                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7762                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7763                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7764                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7765                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7766                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7767                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7768                 </fields>
7769                 <links>
7770                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7771                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7772                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7773                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7774                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7775                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7776                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7777                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7778                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7779                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7780                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7781                 </links>
7782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7783                         <actions>
7784                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7785                                         <context link="purchase_order" field="ordering_agency"/>
7786                                         <context link="picklist" field="org_unit"/>
7787                                 </retrieve>
7788                         </actions>
7789                 </permacrud>
7790         </class>
7791
7792         <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">
7793                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7794                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7795                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7796                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7797                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7798                 </fields>
7799                 <links>
7800                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7801                 </links>
7802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7803                         <actions>
7804                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7805                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7806                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7807                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7808                         </actions>
7809                 </permacrud>
7810         </class>
7811
7812         <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">
7813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7814                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7815                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7816                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7817                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7818                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7819                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7820                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7821                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7822                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7823                 </fields>
7824                 <links>
7825                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7826                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7827                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7828                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7829                 </links>
7830         </class>
7831
7832         <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">
7833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7834                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7835                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7836                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7837                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7838                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7839                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7840                 </fields>
7841                 <links>
7842                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7843                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7844                 </links>
7845         </class>
7846
7847         <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">
7848                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7849                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7850                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7851                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7852                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7853                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7854                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7855                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7856                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7857                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7858                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7859                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7860                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7861                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7862                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7863                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7864                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7865                 </fields>
7866                 <links>
7867                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7868                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7869                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7870                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7871                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7872                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7873                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7874                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7875                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7876                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7877                 </links>
7878         </class>
7879
7880         <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">
7881                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7882                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7883                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7884                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7885                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7886                 </fields>
7887                 <links/>
7888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7889                         <actions>
7890                                 <retrieve />
7891                         </actions>
7892                 </permacrud>
7893         </class>
7894
7895         <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">
7896                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7897                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7898                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7899                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7900                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7901                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7902             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7903                 </fields>
7904                 <links/>
7905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7906             <actions>
7907                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7908                 <retrieve />
7909                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7910                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7911             </actions>
7912         </permacrud>
7913         </class>
7914
7915         <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">
7916                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7917                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7918                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7919                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7920                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7921                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7922                 </fields>
7923                 <links/>
7924         </class>
7925         <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">
7926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7927                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7928                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7929                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7930                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7931                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7932                 </fields>
7933                 <links>
7934                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7935                 </links>
7936         </class>
7937
7938         <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">
7939             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7940                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7941                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7942                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7943                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7944                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7945                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7946         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7947
7948             </fields>
7949             <links>
7950                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7951             </links>
7952             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7953                 <actions>
7954                     <create permission="ADMIN_PROVIDER">
7955                         <context link="provider" field="owner"/>
7956                     </create>
7957                     <retrieve permission="ADMIN_PROVIDER">
7958                         <context link="provider" field="owner"/>
7959                     </retrieve>
7960                     <update permission="ADMIN_PROVIDER">
7961                         <context link="provider" field="owner"/>
7962                     </update>
7963                     <delete permission="ADMIN_PROVIDER">
7964                         <context link="provider" field="owner"/>
7965                     </delete>
7966                 </actions>
7967             </permacrud>
7968         </class>
7969         
7970         <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">
7971             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7972                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7973                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7974                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7975                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7976             </fields>
7977             <links>
7978                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7979             </links>
7980             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7981                 <actions>
7982                     <create permission="ADMIN_PROVIDER">
7983                         <context link="provider" field="owner"/>
7984                     </create>
7985                     <retrieve permission="ADMIN_PROVIDER">
7986                         <context link="provider" field="owner"/>
7987                     </retrieve>
7988                     <update permission="ADMIN_PROVIDER">
7989                         <context link="provider" field="owner"/>
7990                     </update>
7991                     <delete permission="ADMIN_PROVIDER">
7992                         <context link="provider" field="owner"/>
7993                     </delete>
7994                 </actions>
7995             </permacrud>
7996         </class>
7997         
7998         <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">
7999             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8000                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8001                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8002                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8003                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8004                 </fields>
8005                 <links/>
8006         </class>
8007
8008         <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">
8009                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8010                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8011                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8012                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8013                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8014                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8015                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8016                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8017                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8018                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8019                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8020                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8021                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8022                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8023                 </fields>
8024                 <links>
8025                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8026                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8027                 </links>
8028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8029             <actions>
8030                 <create permission="ADMIN_PROVIDER">
8031                     <context link="provider" field="owner"/>
8032                 </create>
8033                 <retrieve permission="ADMIN_PROVIDER">
8034                     <context link="provider" field="owner"/>
8035                 </retrieve>
8036                 <update permission="ADMIN_PROVIDER">
8037                     <context link="provider" field="owner"/>
8038                 </update>
8039                 <delete permission="ADMIN_PROVIDER">
8040                     <context link="provider" field="owner"/>
8041                 </delete>
8042             </actions>
8043         </permacrud>
8044         </class>
8045
8046         <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">
8047                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8048                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8049                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8050                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8051                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8052                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8053                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8054                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8055                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8056                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8057                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8058                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8059                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8060                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8061                 </fields>
8062                 <links>
8063                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8064                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8065                 </links>
8066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8067             <actions>
8068                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8069                     <context link="account" jump="provider" field="owner"/>
8070                 </retrieve>
8071                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8072                     <context link="account" jump="provider" field="owner"/>
8073                 </update>
8074                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8075                     <context link="account" jump="provider" field="owner"/>
8076                 </delete>
8077             </actions>
8078         </permacrud>
8079         </class>
8080
8081
8082         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8083                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8084                         <field name="id" reporter:datatype="id" />
8085                         <field name="parent" reporter:datatype="link"/>
8086                         <field name="owner" reporter:datatype="link"/>
8087                         <field name="create_time" reporter:datatype="timestamp"/>
8088                         <field name="name" reporter:datatype="text"/>
8089                         <field name="shared" reporter:datatype="bool"/>
8090                         <field name="share_with" reporter:datatype="link"/>
8091                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8092                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8093                 </fields>
8094                 <links>
8095                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8096                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8097                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8098                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8099                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8100                 </links>
8101         </class>
8102         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8103                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8104                         <field name="id" reporter:datatype="id" />
8105                         <field name="parent" reporter:datatype="link"/>
8106                         <field name="owner" reporter:datatype="link"/>
8107                         <field name="create_time" reporter:datatype="timestamp"/>
8108                         <field name="name" reporter:datatype="text"/>
8109                         <field name="shared" reporter:datatype="bool"/>
8110                         <field name="share_with" reporter:datatype="link"/>
8111                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8112                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8113                 </fields>
8114                 <links>
8115                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8116                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8117                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8118                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8119                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8120                 </links>
8121         </class>
8122         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8123                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8124                         <field name="id" reporter:datatype="id" />
8125                         <field name="parent" reporter:datatype="link"/>
8126                         <field name="owner" reporter:datatype="link"/>
8127                         <field name="create_time" reporter:datatype="timestamp"/>
8128                         <field name="name" reporter:datatype="text"/>
8129                         <field name="shared" reporter:datatype="bool"/>
8130                         <field name="share_with" reporter:datatype="link"/>
8131                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8132                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8133                 </fields>
8134                 <links>
8135                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8136                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8137                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8138                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8139                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8140                 </links>
8141         </class>
8142         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8143                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8144                         <field name="id" reporter:datatype="id" />
8145                         <field name="owner" reporter:datatype="link"/>
8146                         <field name="create_time" reporter:datatype="timestamp"/>
8147                         <field name="name" reporter:datatype="text"/>
8148                         <field name="data" reporter:datatype="text"/>
8149                         <field name="folder" reporter:datatype="link"/>
8150                         <field name="description" reporter:datatype="text"/>
8151                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8152                 </fields>
8153                 <links>
8154                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8155                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8156                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8157                 </links>
8158         </class>
8159         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8160                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8161                         <field name="id" reporter:datatype="id" />
8162                         <field name="owner" reporter:datatype="link"/>
8163                         <field name="create_time" reporter:datatype="timestamp"/>
8164                         <field name="template" reporter:datatype="link"/>
8165                         <field name="data" reporter:datatype="text"/>
8166                         <field name="folder" reporter:datatype="link"/>
8167                         <field name="recur" reporter:datatype="bool"/>
8168                         <field name="recurrence" reporter:datatype="interval"/>
8169                         <field name="name" reporter:datatype="text"/>
8170                         <field name="description" reporter:datatype="text"/>
8171                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8172                 </fields>
8173                 <links>
8174                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8175                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8176                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8177                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8178                 </links>
8179         </class>
8180         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8181                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8182                         <field name="id" reporter:datatype="id" />
8183                         <field name="runner" reporter:datatype="link"/>
8184                         <field name="start_time" reporter:datatype="timestamp"/>
8185                         <field name="complete_time" reporter:datatype="timestamp"/>
8186                         <field name="run_time" reporter:datatype="timestamp"/>
8187                         <field name="email" reporter:datatype="text"/>
8188                         <field name="excel_format" reporter:datatype="bool"/>
8189                         <field name="csv_format" reporter:datatype="bool"/>
8190                         <field name="html_format" reporter:datatype="bool"/>
8191                         <field name="error_code" reporter:datatype="int"/>
8192                         <field name="error_text" reporter:datatype="text"/>
8193                         <field name="report" reporter:datatype="link"/>
8194                         <field name="folder" reporter:datatype="link"/>
8195                         <field name="chart_pie" reporter:datatype="bool"/>
8196                         <field name="chart_bar" reporter:datatype="bool"/>
8197                         <field name="chart_line" reporter:datatype="bool"/>
8198                 </fields>
8199                 <links>
8200                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8201                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8202                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8203                 </links>
8204         </class>
8205         <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">
8206                 <fields oils_persist:primary="id">
8207                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8208                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8209                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8210                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8211                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8212                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8213                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8214                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8215                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8216                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8217                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8218                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8219                 </fields>
8220                 <links>
8221                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8222                 </links>
8223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8224                         <actions>
8225                                 <retrieve />
8226                         </actions>
8227                 </permacrud>
8228         </class>
8229         <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">
8230                 <fields oils_persist:primary="id">
8231                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8232                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8233                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8234                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8235                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8236                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8237                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8238                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8239                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8240                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8241                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8242                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8243                 </fields>
8244                 <links>
8245                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8246                 </links>
8247         </class>
8248         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8249                 <fields oils_persist:primary="id">
8250                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8251                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8252                         <field reporter:label="Fingerprint" name="fingerprint" />
8253                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8254                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8255                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8256                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8257                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8258                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8259                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8260                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8261                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8262                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8263                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8264                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8265                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8266                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8267                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8268                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8269                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8270                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8271                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8272                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8273                 </fields>
8274                 <links>
8275                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8276                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8277                 </links>
8278         </class>
8279         <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">
8280                 <fields oils_persist:primary="id">
8281                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8282                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8283                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8284                 </fields>
8285                 <links>
8286                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8287                 </links>
8288         </class>
8289         <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">
8290                 <fields oils_persist:primary="id">
8291                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8292                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8293                 </fields>
8294                 <links>
8295                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8296                 </links>
8297         </class>
8298         <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">
8299                 <fields oils_persist:primary="id">
8300                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8301                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8302                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8303                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8304                 </fields>
8305                 <links>
8306                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8307                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8308                 </links>
8309         </class>
8310         <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">
8311                 <fields oils_persist:primary="xact">
8312                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8313                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8314                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8315                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8316                 </fields>
8317                 <links>
8318                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8319                 </links>
8320         </class>
8321         <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">
8322                 <fields oils_persist:primary="xact">
8323                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8324                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8325                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8326                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8327                 </fields>
8328                 <links>
8329                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8330                 </links>
8331         </class>
8332         <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)">
8333                 <fields oils_persist:primary="id">
8334                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8335                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8336                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8337                 </fields>
8338                 <links>
8339                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8340                 </links>
8341         </class>
8342         <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">
8343                 <fields oils_persist:primary="id">
8344                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8345                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8346                 </fields>
8347                 <links>
8348                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8349                 </links>
8350         </class>
8351         <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">
8352                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8353                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
8354                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8355                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8356                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8357                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8358                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8359                 </fields>
8360                 <links>
8361                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8362                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8363                 </links>
8364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8365                         <actions>
8366                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8367                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8368                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8369                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8370                         </actions>
8371                 </permacrud>
8372         </class>
8373         <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">
8374                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8375                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8376                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8377                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8378                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8379                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8380                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8381                 </fields>
8382                 <links>
8383                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8384                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8385                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8386                 </links>
8387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8388                         <actions>
8389                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8390                                         <context link="formula" field="owner"/>
8391                                 </create>
8392                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8393                                         <context link="formula" field="owner"/>
8394                                 </retrieve>
8395                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8396                                         <context link="formula" field="owner"/>
8397                                 </update>
8398                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8399                                         <context link="formula" field="owner"/>
8400                                 </delete>
8401                         </actions>
8402                 </permacrud>
8403         </class>
8404
8405         <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">
8406                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8407                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8408                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8410                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8411                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8412                 </fields>
8413                 <links>
8414                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8415                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8416                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8417                 </links>
8418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8419                         <actions>
8420                                 <create permission="CREATE_PURCHASE_ORDER">
8421                                         <context link="formula" field="owner"/>
8422                 </create>
8423                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8424                                         <context link="formula" field="owner"/>
8425                 </retrieve>
8426                                 <update permission="CREATE_PURCHASE_ORDER">
8427                                         <context link="formula" field="owner"/>
8428                 </update>
8429                                 <delete permission="CREATE_PURCHASE_ORDER">
8430                                         <context link="formula" field="owner"/>
8431                 </delete>
8432                         </actions>
8433                 </permacrud>
8434         </class>
8435
8436         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8437                 <fields oils_persist:primary="id">
8438                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8439                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8440                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8441                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8442                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8443                 </fields>
8444                 <links>
8445                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8446                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8447                 </links>
8448         </class>
8449
8450         <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">
8451                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8452                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8453                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8454                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8455                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8456                 </fields>
8457                 <links>
8458                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8459                 </links>
8460                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8461                         <actions>
8462                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8463                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8464                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8465                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8466                         </actions>
8467                 </permacrud>
8468         </class>
8469
8470         <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">
8471                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8472                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8473                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8474                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8475                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8476                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8477                 </fields>
8478                 <links>
8479                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8480                 </links>
8481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8482                         <actions>
8483                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8484                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8485                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8486                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8487                         </actions>
8488                 </permacrud>
8489         </class>
8490
8491         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8492                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8493                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8494                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8495                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8496                 </fields>
8497                 <links>
8498                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8499                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8500                 </links>
8501         </class>
8502
8503         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8504                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8505                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8506                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8507                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8508                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8509                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8510                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8511                 </fields>
8512                 <links>
8513                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8514                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8515                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8516                 </links>
8517         </class>
8518
8519         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8520                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8521                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8522                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8523                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8524                 </fields>
8525                 <links>
8526                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8527                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8528                 </links>
8529         </class>
8530
8531         <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">
8532                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8533                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8534                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8535                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8536                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8537                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8538                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8539                 </fields>
8540                 <links>
8541                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8542                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8543                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8544                 </links>
8545         </class>
8546
8547         <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">
8548                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8549                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8550                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8551                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8552                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8553                 </fields>
8554                 <links>
8555                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8556                 </links>
8557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8558             <actions>
8559                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8560                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8561                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8562                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8563             </actions>
8564                 </permacrud>
8565         </class>
8566
8567         <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">
8568                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8569                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8570                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8571                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8572                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8573                 </fields>
8574                 <links>
8575                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8576                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8577                 </links>
8578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8579                         <actions>
8580                                 <create permission="ADMIN_CLAIM_POLICY">
8581                                         <context link="claim_policy" field="org_unit"/>
8582                 </create>
8583                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8584                                         <context link="claim_policy" field="org_unit"/>
8585                 </retrieve>
8586                                 <update permission="ADMIN_CLAIM_POLICY">
8587                                         <context link="claim_policy" field="org_unit"/>
8588                 </update>
8589                                 <delete permission="ADMIN_CLAIM_POLICY">
8590                                         <context link="claim_policy" field="org_unit"/>
8591                 </delete>
8592                         </actions>
8593                 </permacrud>
8594         </class>
8595
8596     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8597         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8598             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8599             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8600             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8601             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8602             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8603             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8604             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8605             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8606             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8607             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8608             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8609             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8610             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8611             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8612             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8613         </fields>
8614     </class>
8615
8616     <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">
8617         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8618             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8619             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8620             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8621             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8622             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8623         </fields>
8624     </class>
8625
8626     <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">
8627         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8628             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8629             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8630             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8631             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8632             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8633             <field reporter:label="City" name="city" reporter:datatype="text"/>
8634             <field reporter:label="State" name="state" reporter:datatype="text"/>
8635             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8636             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8637             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8638         </fields>
8639     </class>
8640
8641     <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">
8642         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8643             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8644             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8645             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8646             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8647             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8648             <field reporter:label="City" name="city" reporter:datatype="text"/>
8649             <field reporter:label="State" name="state" reporter:datatype="text"/>
8650             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8651             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8652             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8653         </fields>
8654     </class>
8655
8656     <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">
8657         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8658             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8659             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8660             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8661             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8662             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8663             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8664         </fields>
8665     </class>
8666
8667         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8668                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8669                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8670                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8671                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8672                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8673                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8674                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8675                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8676                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8677                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8678                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8679                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8680                 </fields>
8681                 <links>
8682                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8683                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8684                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8685                 </links>
8686         </class>
8687
8688         <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">
8689                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8690                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8691                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8692                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8693                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8694                 </fields>
8695                 <links>
8696                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8697                 </links>
8698         </class>
8699
8700     <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">
8701         <fields>
8702             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8703             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8704             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8705         </fields>
8706                 <links>
8707                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8708                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8709                 </links>
8710     </class>
8711
8712     <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">
8713         <fields>
8714             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8715             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8716         </fields>
8717                 <links>
8718                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8719                 </links>
8720     </class>
8721
8722     <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">
8723         <fields>
8724             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8725             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8726             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8727         </fields>
8728                 <links>
8729                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8730                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8731                 </links>
8732     </class>
8733
8734     <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">
8735         <fields>
8736             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8737             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8738         </fields>
8739                 <links>
8740                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8741                 </links>
8742     </class>
8743
8744     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8745                 <oils_persist:source_definition>
8746
8747             SELECT  DISTINCT l.*
8748               FROM  action.unfulfilled_hold_loops l
8749                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8750               WHERE l.count = m.max
8751
8752                 </oils_persist:source_definition>
8753         <fields>
8754             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8755             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8756             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8757         </fields>
8758                 <links>
8759                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8760                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8761                 </links>
8762     </class>
8763
8764         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8765                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8766                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8767                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8768                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8769                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8770                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8771                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8772                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8773                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8774                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8775                 </fields>
8776                 <links>
8777                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8778                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8779                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8780                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8781                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8782                 </links>
8783         </class>
8784
8785         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8786                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8787                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8788                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8789                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8790                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8791                 </fields>
8792                 <links>
8793                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8794                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8795                 </links>
8796         </class>
8797
8798         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8799                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8800                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8801                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8802                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8803                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8804                 </fields>
8805                 <links>
8806                 </links>
8807         </class>
8808
8809         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8810                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8811                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8812                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8813                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8814                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8815                 </fields>
8816                 <links>
8817                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8818                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8819                 </links>
8820         </class>
8821         
8822         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8823                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8824                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8825                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8826                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8827                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8828                 </fields>
8829                 <links>
8830                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8831                 </links>
8832         </class>
8833         
8834         <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">
8835                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8836                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8837                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8838                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8839                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8840                 </fields>
8841                 <links>
8842                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8843                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8844                 </links>
8845         </class>
8846
8847         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8848                 <fields oils_persist:primary="name">
8849                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8850                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8851                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8852                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8853                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8854                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8855                 </fields>
8856                 <links>
8857                 </links>
8858         </class>
8859
8860         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8861                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8862                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8863                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8864                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8865                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8866                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8867                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8868                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8869                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8870                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8871                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8872                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8873                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8874                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8875                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8876                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8877                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8878                 </fields>
8879                 <links>
8880                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8881                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8882                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8883                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8884                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8885                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8886                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8887                 </links>
8888         </class>
8889
8890         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8891                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8892                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8893                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8894                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8895                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8896                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8897                 </fields>
8898                 <links>
8899                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8900                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8901                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8902                 </links>
8903         </class>
8904
8905         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8906                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8907                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8908                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8909                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8910                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8911                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8912                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8913                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8914                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8915                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8916                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8917                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8918                 </fields>
8919                 <links>
8920                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8921                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8922                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8923                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8924                 </links>
8925         </class>
8926
8927         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8928                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8929                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8930                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8931                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8932                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8933                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8934                 </fields>
8935                 <links>
8936                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8937                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8938                 </links>
8939         </class>
8940
8941         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8942                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8943                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8944                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8945                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8946                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8947                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8948                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8949                 </fields>
8950                 <links>
8951                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8952                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8953                 </links>
8954         </class>
8955
8956         <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">
8957                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8958                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8959                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8960                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8961                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8962                 </fields>
8963                 <links>
8964                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8965                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8966                 </links>
8967         </class>
8968
8969         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8970                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8971                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8972                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8973                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8974                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8975                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8976                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8977                 </fields>
8978                 <links>
8979                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8980                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8981                 </links>
8982         </class>
8983
8984         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8985                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8986                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8987                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8988                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8989                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8990                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8991                 </fields>
8992                 <links>
8993                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8994                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8995                 </links>
8996         </class>
8997
8998         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8999                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9000                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9001                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9002                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9003                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9004                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9005                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9006                 </fields>
9007                 <links>
9008                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9009                 </links>
9010         </class>
9011
9012         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9013                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9014                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9015                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9016                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9017                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9018                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9019                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9020                 </fields>
9021                 <links>
9022                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9023                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9024                 </links>
9025         </class>
9026
9027         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9028                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9029                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9030                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9031                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9032                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9033                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9034                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9035                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9036                 </fields>
9037                 <links>
9038                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9039                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9040                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9041                 </links>
9042         </class>
9043
9044         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9045                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9046                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9047                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9048                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9049                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9050                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9051                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9052                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9053                 </fields>
9054                 <links>
9055                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9056                 </links>
9057         </class>
9058
9059         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9060                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9061                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9062                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9063                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9064                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9065                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9066                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9067                 </fields>
9068                 <links>
9069                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9070                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9071                 </links>
9072         </class>
9073
9074         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9075                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9076                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9077                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9078                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9079                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9080                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9081                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9082                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9083                 </fields>
9084                 <links>
9085                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9086                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9087                 </links>
9088         </class>
9089
9090         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9091                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9092                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9093                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9094                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9095                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9096                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9097                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9098                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9099                 </fields>
9100                 <links>
9101                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9102                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9103                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9104                 </links>
9105         </class>
9106
9107         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9108                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9109                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9110                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9111                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9112                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9113                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9114                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9115                 </fields>
9116                 <links>
9117                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9118                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9119                 </links>
9120         </class>
9121
9122         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9123                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9124                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9125                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9126                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9127                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9128                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9129                 </fields>
9130                 <links>
9131                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9132                 </links>
9133         </class>
9134
9135         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9136                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9137                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9138                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9139                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9140                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9141                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9142                 </fields>
9143                 <links>
9144                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9145                 </links>
9146         </class>
9147
9148         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9149                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9150                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9151                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9152                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9153                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9154                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9155                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9156                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9157                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9158                 </fields>
9159                 <links>
9160                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9161                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9162                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9163                 </links>
9164         </class>
9165
9166         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9167                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9168                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9169                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9170                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9171                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9172                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9173                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9174                 </fields>
9175                 <links>
9176                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9177                 </links>
9178         </class>
9179
9180         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9181                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9182                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9183                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9184                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9185                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9186                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9187                 </fields>
9188                 <links>
9189                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9190                 </links>
9191         </class>
9192
9193         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9194                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9195                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9196                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9197                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9198                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9199                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9200                 </fields>
9201                 <links>
9202                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9203                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9204                 </links>
9205         </class>
9206
9207         <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">
9208                 <fields oils_persist:primary="id">
9209                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9210                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9211                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9212                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9213                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9214                 </fields>
9215                 <links>
9216                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9217                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9218                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9219                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9220                 </links>
9221         </class>
9222
9223         <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">
9224                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9225                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9226                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9227                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9228                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9229                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9230                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9231                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9232                 </fields>
9233                 <links/>
9234                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9235                         <actions>
9236                                 <retrieve/>
9237                         </actions>
9238                 </permacrud>
9239         </class>
9240
9241         <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">
9242                 <fields oils_persist:primary="ptype_key">
9243                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9244                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9245                 </fields>
9246                 <links/>
9247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9248                         <actions>
9249                                 <retrieve/>
9250                         </actions>
9251                 </permacrud>
9252         </class>
9253
9254         <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">
9255                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9256                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9257                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9258                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9259                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9260                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9261                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9262                 </fields>
9263                 <links>
9264                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9265                 </links>
9266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9267                         <actions>
9268                                 <retrieve/>
9269                         </actions>
9270                 </permacrud>
9271         </class>
9272
9273         <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">
9274                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9275                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9276                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9277                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9278                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9279                 </fields>
9280                 <links>
9281                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9282                 </links>
9283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9284                         <actions>
9285                                 <retrieve/>
9286                         </actions>
9287                 </permacrud>
9288         </class>
9289
9290         <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">
9291                 <fields oils_persist:primary="code">
9292                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9293                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9294                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9295                 </fields>
9296                 <links/>
9297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9298                         <actions>
9299                                 <retrieve/>
9300                         </actions>
9301                 </permacrud>
9302         </class>
9303
9304         <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">
9305                 <oils_persist:source_definition>
9306
9307             SELECT  b.id,
9308                     MAX(dcp.edit_date) AS last_delete_date
9309              FROM   biblio.record_entry b
9310                     JOIN asset.call_number cn ON (cn.record = b.id)
9311                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9312              WHERE  NOT b.deleted
9313              GROUP BY b.id
9314              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9315
9316                 </oils_persist:source_definition>
9317                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9318                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9319                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9320                 </fields>
9321                 <links>
9322                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9323                 </links>
9324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9325                         <actions>
9326                                 <retrieve/>
9327                         </actions>
9328                 </permacrud>
9329         </class>
9330
9331         <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">
9332                 <oils_persist:source_definition>
9333
9334             -- -- 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.
9335             -- -- 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
9336             -- -- may not.
9337             -- SELECT
9338             --     bre.id AS "bib_id",
9339             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9340             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9341             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9342             -- FROM (
9343                 SELECT
9344                     y.bre AS "id",
9345                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9346                     y.hold_count AS "hold_count",
9347                     (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"
9348                 FROM (
9349                         SELECT
9350                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9351                             COUNT(*) AS "hold_count"
9352                         FROM action.hold_request h
9353                         WHERE
9354                             cancel_time IS NULL
9355                             AND fulfillment_time IS NULL
9356                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9357                         GROUP BY 1
9358                     )y LEFT JOIN (
9359                         SELECT 
9360                             (SELECT id
9361                                 FROM biblio.record_entry 
9362                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9363                             ) AS "bre", 
9364                             COUNT(*) AS "copy_count"
9365                         FROM asset.copy
9366                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9367                         WHERE copy.holdable 
9368                             AND NOT copy.deleted 
9369                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9370                         GROUP BY 1
9371                     )x ON x.bre = y.bre
9372                 -- )z RIGHT JOIN (
9373                 --     SELECT id
9374                 --     FROM biblio.record_entry
9375                 --     WHERE NOT deleted
9376                 -- )bre ON (z.bib_id = bre.id)
9377                 
9378
9379                 </oils_persist:source_definition>
9380                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9381                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9382                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9383                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9384                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9385                 </fields>
9386                 <links>
9387                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9388                 </links>
9389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9390                         <actions>
9391                                 <retrieve/>
9392                         </actions>
9393                 </permacrud>
9394         </class>
9395
9396         <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">
9397                 <oils_persist:source_definition>
9398             SELECT *,
9399                 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,
9400                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9401             FROM
9402                 (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
9403                     FROM
9404                         action.hold_request ahr
9405                         JOIN reporter.hold_request_record rhrr USING (id)
9406                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9407                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9408                     WHERE
9409                         ahr.cancel_time IS NULL
9410                         AND ahr.fulfillment_time IS NULL
9411                     GROUP BY bib_record, pickup_lib
9412                 )x
9413                 JOIN
9414                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9415                     FROM
9416                         action.hold_request ahr
9417                         JOIN reporter.hold_request_record rhrr USING (id)
9418                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9419                     WHERE
9420                         ahr.cancel_time IS NULL
9421                         AND ahr.fulfillment_time IS NULL
9422                     GROUP BY bib_record
9423                 )y
9424                 USING (id)
9425                 </oils_persist:source_definition>
9426                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9427                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9428                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9429                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9430                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9431                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9432                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9433                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9434                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9435                 </fields>
9436                 <links>
9437                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9438                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9439                 </links>
9440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9441                         <actions>
9442                                 <retrieve/>
9443                         </actions>
9444                 </permacrud>
9445         </class>
9446
9447         <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">
9448                 <oils_persist:source_definition>
9449             SELECT
9450                 ac.id,
9451                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9452                 MAX(actac.xact_start) AS last_circ
9453             FROM asset.copy ac
9454                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9455             GROUP BY ac.id
9456
9457             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9458             --SELECT
9459             --    ac.id,
9460             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9461             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9462             --FROM asset.copy ac
9463             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9464             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9465             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9466                 </oils_persist:source_definition>
9467                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9468                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9469                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9470                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9471                 </fields>
9472                 <links>
9473                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9474                 </links>
9475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9476                         <actions>
9477                                 <retrieve/>
9478                         </actions>
9479                 </permacrud>
9480         </class>
9481
9482         <!-- ********************************************************************************************************************* -->
9483         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9484         <!-- ********************************************************************************************************************* -->
9485         <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">
9486                 <fields oils_persist:primary="id">
9487                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9488                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9489                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9490                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9491                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9492                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9493                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9494                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9495                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9496                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9497                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9498                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9499                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9500                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9501                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9502                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9503                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9504                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9505                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9506                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9507                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9508                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9509                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9510                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9511                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9512                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9513                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9514                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9515                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9516                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9517                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9518                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9519                 </fields>
9520                 <links>
9521                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9522                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9523                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9524                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9525                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9526                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9527                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9528                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9529                 </links>
9530         </class>
9531
9532         <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">
9533                 <fields oils_persist:primary="id">
9534                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9535                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9536                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9537                 </fields>
9538                 <links>
9539                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9540                 </links>
9541         </class>
9542
9543         <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">
9544                 <fields oils_persist:primary="id">
9545                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9546                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9547                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9548                 </fields>
9549                 <links>
9550                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9551                 </links>
9552         </class>
9553
9554         <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">
9555                 <fields oils_persist:primary="id">
9556                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9557
9558                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9559                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9560                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9561
9562                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9563                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9564                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9565
9566                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9567                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9568
9569                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9570                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9571                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9572
9573                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9574                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9575
9576                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9577                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9578                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9579
9580                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9581                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9582                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9583
9584                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9585                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9586                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9587                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9588
9589                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9590                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9591
9592                 </fields>
9593                 <links>
9594                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9595                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9596                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9597                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9598                 </links>
9599         </class>
9600
9601         <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">
9602                 <oils_persist:source_definition>
9603
9604             SELECT
9605                 po.ordering_agency AS ordering_agency,
9606                 po.id AS purchase_order,
9607                 li.id AS lineitem,
9608                 lid.id AS lineitem_detail,
9609                 cpa.id AS claim_policy_action
9610             FROM
9611                 acq.lineitem_detail lid
9612                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9613                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9614                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9615                 JOIN acq.claim_policy_action cpa ON (
9616                     cpa.claim_policy = cp.id
9617
9618                     -- we only care about claim policy actions whose claim
9619                     -- interval we'd reached or exceeded
9620                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9621
9622                     -- filter out all claim policy actions where claim events
9623                     -- have occurred on or after the action's action_interval
9624                     AND NOT EXISTS (
9625                         SELECT 1
9626                         FROM
9627                             acq.claim_event evt
9628                             JOIN acq.claim claim ON (
9629                                 claim.id = evt.claim
9630                                 AND claim.lineitem_detail = lid.id
9631                             )
9632                         WHERE
9633                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9634                     )
9635                 )
9636             WHERE
9637                 lid.cancel_reason IS NULL
9638                 AND li.cancel_reason IS NULL -- belt/suspenders
9639                 AND po.cancel_reason IS NULL -- belt/suspenders
9640                 AND lid.recv_time IS NULL
9641                 AND po.state = 'on-order'
9642             ORDER BY 1, 2, 3, 4, 5
9643
9644                 </oils_persist:source_definition>
9645                 <fields>
9646                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9647                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9648                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9649                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9650                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9651                 </fields>
9652                 <links>
9653                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9654                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9655                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9656                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9657                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9658                 </links>
9659         </class>
9660         <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">
9661                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9662                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9663                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9664                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9665                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9666                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9667                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9668                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9669                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9670                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9671                 </fields>
9672                 <links>
9673                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9674                 </links>
9675     </class>
9676         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
9677                 <oils_persist:source_definition>
9678             SELECT * FROM acq.lineitem_summary 
9679                                 WHERE item_count > (invoice_count + cancel_count)
9680         </oils_persist:source_definition>
9681                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9682                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9683                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9684                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9685                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9686                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9687                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9688                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9689                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9690                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9691                 </fields>
9692                 <links>
9693                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9694                 </links>
9695     </class>
9696         <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">
9697                 <oils_persist:source_definition>
9698
9699                         SELECT  t.*
9700                           FROM  action.transit_copy t
9701                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9702                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9703                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9704
9705                 </oils_persist:source_definition>
9706                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9707                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9708                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9709                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9710                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9711                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9712                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9713                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9714                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9715                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9716                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9717                 </fields>
9718                 <links>
9719                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9720                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9721                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9722                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9723                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9724                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9725                 </links>
9726         </class>
9727
9728     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9729                 <oils_persist:source_definition>
9730
9731         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9732                 SELECT
9733                         cp.id as copy,
9734                         COUNT(circ.id),
9735                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9736                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9737                 FROM
9738                         asset.copy cp
9739                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9740                 GROUP BY 1, 3, 4
9741                 UNION
9742                 SELECT
9743                         cp.id as copy,
9744                         COUNT(circ.id),
9745                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9746                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9747                 FROM
9748                         asset.copy cp
9749                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9750                 GROUP BY 1, 3, 4
9751                 UNION
9752                 SELECT
9753                         id as copy,
9754                         circ_count,
9755                         -1 AS year,
9756                         false as is_renewal
9757                 FROM
9758                         extend_reporter.legacy_circ_count
9759         )x GROUP BY 1, 3, 4
9760
9761                 </oils_persist:source_definition>
9762         <fields>
9763             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9764             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9765             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9766             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9767         </fields>
9768                 <links>
9769                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9770                 </links>
9771                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9772                         <actions>
9773                                 <retrieve/>
9774                         </actions>
9775                 </permacrud>
9776     </class>
9777
9778         <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">
9779                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9780                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9781                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9782                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9783                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9784                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9785                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9786                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9787                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9788                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9789                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9790                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9791                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9792                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9793                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9794                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9795                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9796                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9797                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9798                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9799                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9800                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9801                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9802                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9803                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9804                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9805                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9806                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9807                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9808                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9809                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9810                 </fields>
9811                 <links>
9812                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9813                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9814                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9815                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9816                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9817                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9818                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9819                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9820                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9821                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9822                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9823                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9824                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9825                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9826                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9827                 </links>
9828         </class>
9829
9830     <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">
9831         <fields oils_persist:primary="id">
9832             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9833             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9834             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9835             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9836             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9837             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9838             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9839             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9840             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9841             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9842             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9843             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9844             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9845             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9846             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9847             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9848             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9849             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9850             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9851             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9852             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9853             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9854             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9855             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9856             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9857             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9858             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9859             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9860             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9861             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9862             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9863             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9864             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9865             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9866         </fields>
9867         <links>
9868             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9869             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9870             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9871             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9872             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9873         </links>
9874     </class>
9875
9876     <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">
9877         <fields oils_persist:primary="id">
9878             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9879             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9880             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9881             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9882         </fields>
9883         <links>
9884             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9885             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9886         </links>
9887     </class>
9888
9889     <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">
9890         <fields oils_persist:primary="owning_lib">
9891             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9892             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9893             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9894         </fields>
9895         <links>
9896             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9897         </links>
9898     </class>
9899
9900     <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">
9901         <fields oils_persist:primary="id">
9902             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9903             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9904             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9905             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9906             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9907         </fields>
9908         <links>
9909             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9910             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9911             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9912         </links>
9913     </class>
9914
9915     <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">
9916         <fields oils_persist:primary="circ_lib">
9917             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9918             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9919             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9920             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9921         </fields>
9922         <links>
9923             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9924             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9925         </links>
9926     </class>
9927
9928     <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">
9929         <fields oils_persist:primary="id">
9930             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9931             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9932             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9933             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9934             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9935         </fields>
9936         <links>
9937             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9938             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9939             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9940         </links>
9941     </class>
9942
9943     <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">
9944         <fields oils_persist:primary="home_ou">
9945             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9946             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9947             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9948             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9949         </fields>
9950         <links>
9951             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9952             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9953         </links>
9954     </class>
9955         <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">
9956                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9957                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9958                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9959                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9960                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9961                 </fields>
9962                 <links>
9963                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9964                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9965                 </links>
9966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9967                         <actions>
9968                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9969                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9970                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9971                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9972                         </actions>
9973                 </permacrud>
9974         </class>
9975         <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">
9976                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9977                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9978                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9979                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9980                 </fields>
9981                 <links>
9982                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9983                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9984                         </links>
9985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9986                 <actions>
9987                                 <create permission="ADMIN_ACQ_FUND_TAG">
9988                                         <context link="tag" field="owner"/>
9989                                 </create>
9990                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9991                                         <context link="tag" field="owner"/>
9992                                 </retrieve>
9993                                 <update permission="ADMIN_ACQ_FUND_TAG">
9994                                         <context link="tag" field="owner"/>
9995                                 </update>
9996                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9997                                         <context link="tag" field="owner"/>
9998                                 </delete>
9999                         </actions>
10000                 </permacrud>
10001         </class>
10002         <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">
10003                 <oils_persist:source_definition><![CDATA[
10004                 SELECT
10005                         poi.purchase_order AS purchase_order,
10006                         ii.invoice AS invoice,
10007                         NULL AS lineitem,
10008                         poi.id AS po_item,
10009                         NULL AS picklist
10010                 FROM
10011                         acq.po_item poi
10012                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10013                 UNION SELECT
10014                         jub.purchase_order AS purchase_order,
10015                         ie.invoice AS invoice,
10016                         jub.id AS lineitem,
10017                         NULL AS po_item,
10018                         jub.picklist AS picklist
10019                 FROM
10020                         acq.lineitem jub
10021                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10022                 UNION SELECT
10023                         ii.purchase_order AS purchase_order,
10024                         ii.invoice AS invoice,
10025                         NULL AS lineitem,
10026                         NULL AS po_item,
10027                         NULL AS picklist
10028                 FROM
10029                         acq.invoice_item ii
10030                 WHERE ii.po_item IS NULL
10031                 UNION SELECT
10032                         ie.purchase_order AS purchase_order,
10033                         ie.invoice AS invoice,
10034                         NULL AS lineitem,
10035                         NULL AS po_item,
10036                         NULL AS picklist
10037                 FROM
10038                         acq.invoice_entry ie
10039                 WHERE ie.lineitem IS NULL
10040                 UNION SELECT
10041                         NULL AS purchase_order,
10042                         NULL AS invoice,
10043                         jub.id AS lineitem,
10044                         NULL AS po_item,
10045                         jub.picklist AS picklist
10046                 FROM
10047                         acq.lineitem jub
10048                 WHERE jub.purchase_order IS NULL
10049                 ]]></oils_persist:source_definition>
10050                 <fields>
10051                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10052                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10053                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10054                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10055                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10056                 </fields>
10057                 <links>
10058                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10059                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10060                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10061                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10062                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10063                 </links>
10064         </class>
10065         <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">
10066                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10067                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10068                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10069                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10070                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10071                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10072                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10073                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10074                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10075                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10076                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10077                 </fields>
10078                 <links>
10079                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10080                 </links>
10081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10082                         <actions>
10083                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10084                                 <retrieve/>
10085                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10086                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10087                         </actions>
10088                 </permacrud>
10089         </class>
10090
10091         <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">
10092                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10093                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10094                         <field name="date_applied" reporter:datatype="timestamp"/>
10095                         <field name="org" reporter:datatype="org_unit"/>
10096                         <field name="original_value" reporter:datatype="text"/>
10097                         <field name="new_value" reporter:datatype="text"/>
10098                         <field name="field_name" reporter:datatype="link"/>
10099                 </fields>
10100                 <links>
10101                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10102                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10103                 </links>
10104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10105                         <actions>
10106                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10107                                 <retrieve/>
10108                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10109                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10110                         </actions>
10111                 </permacrud>
10112         </class>
10113         <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">
10114                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10115                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10116                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10117                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10118                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10119                 </fields>
10120                 <links>
10121                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10122                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10123                 </links>
10124         </class>
10125         <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">
10126                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10127                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10128                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10129                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10130                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10131                 </fields>
10132                 <links>
10133                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10134                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10135                 </links>
10136         </class>
10137
10138
10139         <!-- ********************************************************************************************************************* -->
10140
10141 </IDL>
10142
10143 <!--
10144     vim:noet:ts=4:sw=4:
10145 -->