]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Custom Org Tree : DB and IDL
[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                 </fields>
214                 <links>
215                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
216                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
217                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
218                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
219                 </links>
220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
221                         <actions>
222                                 <create permission="CREATE_IMPORT_ITEM">
223                     <context link="definition" field="owner"/>
224                                 </create>
225                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
226                     <context link="definition" field="owner"/>
227                                 </retrieve>
228                                 <update permission="UPDATE_IMPORT_ITEM">
229                     <context link="definition" field="owner"/>
230                                 </update>
231                                 <delete permission="DELETE_IMPORT_ITEM">
232                     <context link="definition" field="owner"/>
233                                 </delete>
234                         </actions>
235                 </permacrud>
236         </class>
237
238         <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">
239                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
240                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
241                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
242                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
243                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
244                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
245                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
246                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
247                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
263                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
264                 </fields>
265                 <links>
266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
267                 </links>
268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
269                         <actions>
270                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
271                                 <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"/>
272                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
273                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
274                         </actions>
275                 </permacrud>
276         </class>
277
278         <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">
279                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
280                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
281                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
282                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
283                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
284                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
285                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
286                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
287                 </fields>
288                 <links>
289                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
290                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
291                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
292                 </links>
293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
294                         <actions>
295                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
296                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
297                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
298                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
299                         </actions>
300                 </permacrud>
301         </class>
302
303         <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">
304                 <fields oils_persist:primary="code">
305                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
306                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
307                 </fields>
308                 <links>
309                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
310                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
311                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <retrieve/>
316                         </actions>
317                 </permacrud>
318         </class>
319
320         <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">
321                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
322                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
323                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
324                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
325                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
326                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
327                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
328                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
329                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
330                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
331                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
332                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
333                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
334                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
335                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
336                 </fields>
337                 <links>
338                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
339                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
340                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
341                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
342             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
343             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
344             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
345                 </links>
346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
347                         <actions>
348                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
352                         </actions>
353                 </permacrud>
354         </class>
355
356         <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">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
358                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
360                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
361                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
362                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
363                 </fields>
364                 <links/>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
368                 <retrieve/>
369                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
370                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
371                         </actions>
372                 </permacrud>
373         </class>
374
375         <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">
376                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
377                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
378                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
379                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
380                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
381                 </fields>
382                 <links>
383                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
384                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
385                 </links>
386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
387                         <actions>
388                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
389                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
390                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
391                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
392                         </actions>
393                 </permacrud>
394         </class>
395
396         <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">
397                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
398                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
399                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
400                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
401                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
402                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
403                 </fields>
404                 <links>
405                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
406                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
407                 </links>
408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
409                         <actions>
410                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
411                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
412                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
413                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
414                         </actions>
415                 </permacrud>
416         </class>
417
418         <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">
419                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
420                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
421                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
422                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
423                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
424                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
425                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
426                 </fields>
427                 <links>
428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
429                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
430                 </links>
431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
432                         <actions>
433                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
434                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
435                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
436                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
437                         </actions>
438                 </permacrud>
439         </class>
440
441         <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">
442                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
443                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
444                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
445                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
446                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
447                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
448                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
449                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
450                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
451                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
452                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
453                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
454                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
455                 </fields>
456                 <links>
457                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
458                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
459                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
460             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
461             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
462                 </links>
463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
464                         <actions>
465                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
466                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                         </actions>
470                 </permacrud>
471         </class>
472
473         <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">
474                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
476                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
477                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
478                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
479                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
480                 </fields>
481                 <links/>
482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
483                         <actions>
484                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
485                 <retrieve/>
486                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
487                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
488                         </actions>
489                 </permacrud>
490         </class>
491
492         <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">
493                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
494                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
496                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
497                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
498                 </fields>
499                 <links>
500                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
501                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
502                 </links>
503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
504                         <actions>
505                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
506                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
507                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
508                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
509                         </actions>
510                 </permacrud>
511         </class>
512
513         <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">
514                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
515                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
516                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
517                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
522                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
523                 </links>
524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525                         <actions>
526                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
530                         </actions>
531                 </permacrud>
532         </class>
533
534         <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">
535                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
536                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
537                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
538                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
539                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
540                 </fields>
541                 <links>
542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
543                 </links>
544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
545                         <actions>
546                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
547                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
548                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
549                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
550                         </actions>
551                 </permacrud>
552         </class>
553
554         <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">
555                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
556                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
557                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
558                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
559                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
560                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
561                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
562                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
563             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
564                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
565                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
566                 </fields>
567                 <links>
568                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
569                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
570                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
571                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
572                 </links>
573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
574                         <actions>
575                                 <create permission="ADMIN_IMPORT_MATCH_SET">
576                     <context link="match_set" field="owner"/>
577                                 </create>
578                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
579                     <context link="match_set" field="owner"/>
580                                 </retrieve>
581                                 <update permission="ADMIN_IMPORT_MATCH_SET">
582                     <context link="match_set" field="owner"/>
583                                 </update>
584                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
585                     <context link="match_set" field="owner"/>
586                                 </delete>
587                         </actions>
588                 </permacrud>
589         </class>
590
591         <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">
592                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
593                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
594                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
595                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
596                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
597                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
598                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
599                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
600                 </fields>
601                 <links>
602                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
603                 </links>
604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
605                         <actions>
606                                 <create permission="ADMIN_IMPORT_MATCH_SET">
607                     <context link="match_set" field="owner"/>
608                                 </create>
609                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
610                     <context link="match_set" field="owner"/>
611                                 </retrieve>
612                                 <update permission="ADMIN_IMPORT_MATCH_SET">
613                     <context link="match_set" field="owner"/>
614                                 </update>
615                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
616                     <context link="match_set" field="owner"/>
617                                 </delete>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <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">
623                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
624                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
625                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
626                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
627                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
628                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
629                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
630                 </fields>
631                 <links>
632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
634                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
635                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
636                 </links>
637         </class>
638
639     <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">
640         <fields oils_persist:primary="name">
641             <field reporter:label="Name" name="name" reporter:datatype="text"/>
642             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
643             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
644             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
645         </fields>
646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647             <actions>
648                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
649                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
650                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
651                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
652             </actions>
653         </permacrud>
654     </class>
655
656     <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">
657         <fields oils_persist:primary="id">
658             <field reporter:label="ID" name="id" reporter:datatype="id"/>
659             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
660             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
661             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
662             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
663         </fields>
664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665             <actions>
666                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
667                 <retrieve/>
668                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
669                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
670             </actions>
671         </permacrud>
672     </class>
673
674         <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">
675                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
676                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
678                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
679                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
680                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
681                 </fields>
682                 <links>
683                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
684                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
685                 </links>
686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687             <actions>
688                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
689                 <retrieve/>
690                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
691                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
692             </actions>
693         </permacrud>
694         </class>
695
696         <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">
697                 <fields oils_persist:primary="name">
698                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
699                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
700                         <field reporter:label="Description" name="description" reporter:datatype="text" />
701                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
702                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
703                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
704                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
705                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
706                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
707                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
708                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
709                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
710                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
711                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
712                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
713                 </fields>
714                 <links>
715                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
716                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
717                 </links>
718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
719             <actions>
720                 <create permission="ADMIN_SVF" global_required="true"/>
721                 <retrieve/>
722                 <update permission="ADMIN_SVF" global_required="true"/>
723                 <delete permission="ADMIN_SVF" global_required="true"/>
724             </actions>
725         </permacrud>
726         </class>
727
728         <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">
729                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
731                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
732                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
733             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
734                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
735                 </fields>
736                 <links/>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
740                 <retrieve/>
741                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
742                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
743             </actions>
744         </permacrud>
745         </class>
746
747         <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">
748                 <fields oils_persist:primary="id">
749                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
750                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
751                 </fields>
752                 <links>
753                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
754                 </links>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <retrieve/>
758             </actions>
759         </permacrud>
760         </class>
761
762         <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">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
765                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
766                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
767                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
768                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
769                 </fields>
770                 <links>
771                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
772                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
773                 </links>
774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
775             <actions>
776                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <retrieve/>
778                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780             </actions>
781         </permacrud>
782         </class>
783
784         <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">
785                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
786                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
787                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
788                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
789                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
790                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
791                 </fields>
792                 <links>
793                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
794                 </links>
795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
796             <actions>
797                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
798                 <retrieve/>
799                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
800                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
801             </actions>
802         </permacrud>
803         </class>
804
805         <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">
806                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
807                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
808                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
809                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
810                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
811                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
812                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
813                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
814                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
815                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
816                 </fields>
817                 <links>
818                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
819                 </links>
820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
821             <actions>
822                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
823                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
824                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
825                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
826             </actions>
827         </permacrud>
828         </class>
829
830     <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">
831         <fields oils_persist:primary="name">
832             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
833             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
834             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
835             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
836             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
837             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
838             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
839             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
840             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
841             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
842         </fields>
843         <links>
844             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
845             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
846         </links>
847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
848             <actions>
849                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
850                 <retrieve/>
851                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
852                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
853             </actions>
854         </permacrud>
855     </class>
856
857     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
858         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
859             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
860             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
861             <field reporter:label="Name" name="name" reporter:datatype="text"/>
862             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
863             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
864             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
865             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
866         </fields>
867         <links>
868             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
869         </links>
870     </class>
871
872         <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">
873                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
874                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
875                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
876                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
877                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
878                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
879                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
880                 </fields>
881                 <links>
882             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
883             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
884                 </links>
885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
886                         <actions>
887                                 <retrieve/>
888                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
889                         </actions>
890                 </permacrud>
891         </class>
892
893         <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">
894                 <fields oils_persist:primary="key">
895                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
896                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
897                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
898                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
899                 </fields>
900                 <links/>
901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
902                         <actions>
903                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
904                                 <retrieve/>
905                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
906                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
907                         </actions>
908                 </permacrud>
909         </class>
910
911         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
912                 <fields oils_persist:primary="module">
913                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
914                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
915                 </fields>
916                 <links/>
917         </class>
918
919         <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">
920                 <fields oils_persist:primary="module">
921                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
922                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
923                 </fields>
924                 <links/>
925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
926                         <actions>
927                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
928                                 <retrieve/>
929                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
930                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
931                         </actions>
932                 </permacrud>
933         </class>
934
935         <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">
936                 <fields oils_persist:primary="module">
937                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
938                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
939                 </fields>
940                 <links/>
941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
942                         <actions>
943                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
944                                 <retrieve/>
945                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
946                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
947                         </actions>
948                 </permacrud>
949         </class>
950
951         <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">
952                 <fields oils_persist:primary="module">
953                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
954                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
955                 </fields>
956                 <links/>
957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
958                         <actions>
959                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
960                                 <retrieve/>
961                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
962                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
963                         </actions>
964                 </permacrud>
965         </class>
966
967         <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">
968                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
969                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
970                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
971                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
972                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
973                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
974                 </fields>
975                 <links>
976                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
977                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
978                 </links>
979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
980                         <actions>
981                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
982                     <context link="event_def" field="owner"/>
983                 </create>
984                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
985                     <context link="event_def" field="owner"/>
986                 </retrieve>
987                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
988                     <context link="event_def" field="owner"/>
989                 </update>
990                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
991                     <context link="event_def" field="owner"/>
992                 </delete>
993                         </actions>
994                 </permacrud>
995         </class>
996
997         <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">
998                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
999                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1000                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1001                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1002                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1003                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1004                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1005                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1006                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1007                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1008                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1009                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1010                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1011                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1012                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1013                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1014                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1015                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1016                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1017                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1018                 </fields>
1019                 <links>
1020                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1021                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1022                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1023                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1024                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1025                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1026                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1027                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1028                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1029                 </links>
1030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1031                         <actions>
1032                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1033                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1034                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1035                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1036                         </actions>
1037                 </permacrud>
1038         </class>
1039
1040         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1041                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1042                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1043                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1044                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1045                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1046                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1047                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1048                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1049                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1050                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1051                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1052                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1053                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1054                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1055                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1056                 </fields>
1057                 <links>
1058                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1059                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1060                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1061                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1062                 </links>
1063         </class>
1064
1065         <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">
1066                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1067                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1068                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1069                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1070                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1071                 </fields>
1072                 <links>
1073                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1074                 </links>
1075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1076                         <actions>
1077                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1078                     <context link="event_def" field="owner"/>
1079                 </create>
1080                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1081                     <context link="event_def" field="owner"/>
1082                 </retrieve>
1083                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1084                     <context link="event_def" field="owner"/>
1085                 </update>
1086                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1087                     <context link="event_def" field="owner"/>
1088                 </delete>
1089                         </actions>
1090                 </permacrud>
1091         </class>
1092
1093         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1094                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1095                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1096                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1097                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1098                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1099                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1100                 </fields>
1101                 <links>
1102                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1103                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1104                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1105                 </links>
1106         </class>
1107
1108         <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">
1109                 <fields oils_persist:primary="code">
1110                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1111                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1112                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1113                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1114                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1115                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1116                 </fields>
1117                 <links/>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1123                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <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">
1129                 <fields oils_persist:primary="code">
1130                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1131                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1132                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1133                 </fields>
1134                 <links/>
1135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1136             <actions>
1137                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1138                 <retrieve/>
1139                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1140                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1141             </actions>
1142         </permacrud>
1143         </class>
1144
1145         <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">
1146                 <fields oils_persist:primary="code">
1147                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1148                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1149                 </fields>
1150                 <links/>
1151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1152             <actions>
1153                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1154                 <retrieve/>
1155                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1156                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1157             </actions>
1158         </permacrud>
1159         </class>
1160
1161         <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">
1162                 <fields oils_persist:primary="code">
1163                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1164                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1165                 </fields>
1166                 <links/>
1167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1168             <actions>
1169                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1170                 <retrieve/>
1171                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1172                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1173             </actions>
1174         </permacrud>
1175         </class>
1176
1177         <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">
1178                 <fields oils_persist:primary="code">
1179                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1180                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1181                 </fields>
1182                 <links/>
1183         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1184             <actions>
1185                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1186                 <retrieve/>
1187                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1188                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1189             </actions>
1190         </permacrud>
1191         </class>
1192
1193         <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">
1194                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1195                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1196                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1197                 </fields>
1198                 <links/>
1199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1200             <actions>
1201                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1202                 <retrieve/>
1203                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1204                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1205             </actions>
1206         </permacrud>
1207         </class>
1208
1209         <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">
1210                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1211                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1212                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1213                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1214                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1215                 </fields>
1216         <links>
1217             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1218             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1219             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1220         </links>
1221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1222             <actions>
1223                 <create permission="UPDATE_COPY">
1224                     <context link="target_copy" field="circ_lib"/>
1225                 </create>
1226                 <retrieve/>
1227                 <update permission="UPDATE_COPY">
1228                     <context link="target_copy" field="circ_lib"/>
1229                 </update>
1230                 <delete permission="UPDATE_COPY">
1231                     <context link="target_copy" field="circ_lib"/>
1232                 </delete>
1233             </actions>
1234         </permacrud>
1235         </class>
1236
1237         <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">
1238                 <fields oils_persist:primary="code">
1239                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1240                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1241                 </fields>
1242                 <links/>
1243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1244             <actions>
1245                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1246                 <retrieve/>
1247                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1248                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1249             </actions>
1250         </permacrud>
1251         </class>
1252
1253         <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">
1254                 <fields oils_persist:primary="code">
1255                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1256                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1257                 </fields>
1258                 <links/>
1259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1260             <actions>
1261                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1262                 <retrieve/>
1263                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1264                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1265             </actions>
1266         </permacrud>
1267         </class>
1268
1269         <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">
1270                 <fields oils_persist:primary="code">
1271                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1272                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1273                 </fields>
1274                 <links/>
1275         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1276             <actions>
1277                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1278                 <retrieve/>
1279                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1280                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1281             </actions>
1282         </permacrud>
1283         </class>
1284
1285     <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">
1286         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1287             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1288             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1289             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1290             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1291             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1292             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1293             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1294             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1295             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1296             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1297             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1298             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1299             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1300             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1301             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1302         </fields>
1303         <links/>
1304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1305             <actions>
1306                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1307                 <retrieve/>
1308                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1309                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1310             </actions>
1311         </permacrud>
1312     </class>
1313
1314     <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">
1315         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1316             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1317             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1318             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1319             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1320             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1321             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1322             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1323             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1324             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1325             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1326             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1327             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1328             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1329             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1330             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1331         </fields>
1332         <links/>
1333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1334             <actions>
1335                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1336                 <retrieve/>
1337                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1338                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1339             </actions>
1340         </permacrud>
1341     </class>
1342
1343     <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">
1344         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1345             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1346             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1347             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1348             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1349             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1350         </fields>
1351         <links>
1352             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1353             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1354             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1355         </links>
1356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1357             <actions>
1358                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1359                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1360                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1361                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1362             </actions>
1363         </permacrud>
1364     </class>
1365
1366         <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">
1367                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1368                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1369                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1370                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1371                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1372                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1373                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1374                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1375                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1376                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1377                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1378                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1379                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1380                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1381                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1382                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1383                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1384             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1385                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1386                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1387                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1388                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1389                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1390                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1391                 </fields>
1392                 <links>
1393                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1394                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1395                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1396                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1397                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1398                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1399                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1400                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1401                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1402                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1403                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1404                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1405                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1406             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1407                 </links>
1408         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1409             <actions>
1410                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1411                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1412                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1413                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1414             </actions>
1415         </permacrud>
1416         </class>
1417
1418         <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">
1419                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1420                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1421                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1422                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1423                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1424                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1425                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1426                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1427                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1428                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1429                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1430                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1431                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1432                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1433                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1434             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1435                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1436                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1437             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1438                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1439                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1440                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1441                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1442             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1443             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1444             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1445                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1446                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1447                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1448                 </fields>
1449                 <links>
1450                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1451                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1452                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1453                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1454                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1455                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1456                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1457                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1458                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1459                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1460                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1461                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1462                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1463             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1464                 </links>
1465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1466             <actions>
1467                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1468                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1469                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1470                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1471             </actions>
1472         </permacrud>
1473         </class>
1474
1475     <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">
1476         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1477             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1478             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1479             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1480         </fields>
1481         <links/>
1482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1483             <actions>
1484                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1485                 <retrieve/>
1486                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1487                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1488             </actions>
1489         </permacrud>
1490     </class>
1491
1492     <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">
1493         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1494             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1495             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1496             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1497             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1498             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1499             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1500             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1501         </fields>
1502         <links>
1503             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1504         </links>
1505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1506             <actions>
1507                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1508                 <retrieve/>
1509                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1510                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1511             </actions>
1512         </permacrud>
1513     </class>
1514
1515     <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">
1516         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1517             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1518             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1519             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1520             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1521             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1522         </fields>
1523         <links>
1524             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1525             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1526         </links>
1527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1528             <actions>
1529                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1530                     <context link="matchpoint" field="org_unit"/>
1531                 </create>
1532                 <retrieve/>
1533                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1534                     <context link="matchpoint" field="org_unit"/>
1535                 </update>
1536                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1537                     <context link="matchpoint" field="org_unit"/>
1538                 </delete>
1539             </actions>
1540         </permacrud>
1541     </class>
1542
1543     <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">
1544         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1545             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1546             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1547             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1548         </fields>
1549         <links>
1550             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1551             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1552         </links>
1553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1554             <actions>
1555                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1556                     <context link="limit_set" field="owning_lib"/>
1557                 </create>
1558                 <retrieve/>
1559                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1560                     <context link="limit_set" field="owning_lib"/>
1561                 </update>
1562                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1563                     <context link="limit_set" field="owning_lib"/>
1564                 </delete>
1565             </actions>
1566         </permacrud>
1567     </class>
1568
1569     <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">
1570         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1571             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1572             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1573             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1574             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1575         </fields>
1576         <links>
1577             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1578             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1579         </links>
1580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1581             <actions>
1582                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1583                     <context link="limit_set" field="owning_lib"/>
1584                 </create>
1585                 <retrieve/>
1586                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1587                     <context link="limit_set" field="owning_lib"/>
1588                 </update>
1589                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1590                     <context link="limit_set" field="owning_lib"/>
1591                 </delete>
1592             </actions>
1593         </permacrud>
1594     </class>
1595
1596         <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">
1597                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1598                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1599                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1600                 </fields>
1601                 <links/>
1602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1603             <actions>
1604                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1605                 <retrieve/>
1606                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1607                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1608             </actions>
1609         </permacrud>
1610         </class>
1611
1612         <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">
1613                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1614                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1615                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1616                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1617                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1618                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1619                 </fields>
1620                 <links>
1621                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1622                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1623                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1624                 </links>
1625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1626             <actions>
1627                 <create permission="ADMIN_SURVEY">
1628                     <context link="survey" field="owner"/>
1629                 </create>
1630                 <retrieve/>
1631                 <update permission="ADMIN_SURVEY">
1632                     <context link="survey" field="owner"/>
1633                 </update>
1634                 <delete permission="ADMIN_SURVEY">
1635                     <context link="survey" field="owner"/>
1636                 </delete>
1637             </actions>
1638         </permacrud>
1639         </class>
1640         <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">
1641                 <fields oils_persist:primary="id" oils_persist:sequence="">
1642                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1643                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1644                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1645                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1646                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1647                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1648                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1649                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1650                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1651                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1652                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1653                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1654                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1655                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1656                 </fields>
1657                 <links>
1658                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1659                 </links>
1660         </class>
1661         <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">
1662                 <fields oils_persist:primary="id" oils_persist:sequence="">
1663                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1664                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1665                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1666                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1667                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1668                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1669                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1670                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1671                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1672                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1673                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1674                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1675                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1676                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1677                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1678                 </fields>
1679                 <links>
1680                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1681                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1682                 </links>
1683         </class>
1684         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1685                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1686                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1687                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1688                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1689                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1690                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1691                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1692                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1693                 </fields>
1694                 <links>
1695                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1696                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1697                 </links>
1698         </class>
1699         <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">
1700                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1701                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1702                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1703                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1704                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1705                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1706                 </fields>
1707                 <links>
1708                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1709                 </links>
1710         </class>
1711         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1712                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1713                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1714                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1715                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1716                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1717                 </fields>
1718                 <links>
1719                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1720                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1721                 </links>
1722         </class>
1723         <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">
1724                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1725                         <field name="field" reporter:datatype="link"/>
1726                         <field name="id" reporter:datatype="id" />
1727                         <field name="source" reporter:datatype="link"/>
1728                         <field name="value" reporter:datatype="text"/>
1729                 </fields>
1730                 <links>
1731                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1732                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1733                 </links>
1734         </class>
1735         <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">
1736                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1737                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1738                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1739                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1740                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1741                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1742                 </fields>
1743                 <links>
1744                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1745                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1746                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1747                 </links>
1748         </class>
1749         <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">
1750                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1751                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1752                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1753                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1754                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1755                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1756                 </fields>
1757                 <links>
1758                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1759                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1760                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1761                 </links>
1762         </class>
1763         <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">
1764                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1765                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1766                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1767                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1768                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1769                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1770                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1771                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1772                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1773                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1774                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1775                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1776                 </fields>
1777                 <links>
1778                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1779                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1780                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1781                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1782                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1783                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1784                 </links>
1785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1786             <actions>
1787                 <create permission="TRANSIT_COPY" context_field="owner">
1788                     <context link="target_copy" field="circ_lib"/>
1789                 </create>
1790                 <retrieve/>
1791                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1792                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1793             </actions>
1794         </permacrud>
1795         </class>
1796         <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">
1797                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1798                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1799                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1800                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1801                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1802                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1803                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1804                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1805                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1806                 </fields>
1807                 <links>
1808                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1809                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1810                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1811                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1812                 </links>
1813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1814             <actions>
1815                 <create permission="ADMIN_SURVEY">
1816                     <context link="survey" field="owner"/>
1817                 </create>
1818                 <retrieve/>
1819                 <update permission="ADMIN_SURVEY">
1820                     <context link="survey" field="owner"/>
1821                 </update>
1822                 <delete permission="ADMIN_SURVEY">
1823                     <context link="survey" field="owner"/>
1824                 </delete>
1825             </actions>
1826         </permacrud>
1827         </class>
1828         <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">
1829                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1830                         <field name="bucket" />
1831                         <field name="id" reporter:datatype="id" />
1832                         <field name="target_copy" reporter:datatype="link"/>
1833                         <field name="create_time" reporter:datatype="timestamp" />
1834                         <field name="pos" reporter:datatype="int" />
1835                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1836                 </fields>
1837                 <links>
1838                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1839                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1840             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1841                 </links>
1842         </class>
1843         <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">
1844                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1845                         <field name="id" reporter:datatype="id" />
1846                         <field name="item" reporter:datatype="link"/>
1847                         <field name="note" reporter:datatype="text" />
1848                 </fields>
1849                 <links>
1850                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1851                 </links>
1852         </class>
1853
1854         <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">
1855                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1856                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1857                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1858                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1859                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1860                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1861                 </fields>
1862                 <links>
1863                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1864                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1865                 </links>
1866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1867                         <actions>
1868                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1869                                 <retrieve/>
1870                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1871                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1872                         </actions>
1873                 </permacrud>
1874         </class>
1875
1876         <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">
1877                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1878                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1879                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1880                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1881                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1882                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1883                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
1884                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1885                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1886                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1887                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1888                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1889                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1890                 </fields>
1891                 <links>
1892                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1893                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1894                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1895                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1896                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1897                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1898                 </links>
1899                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1900                         <actions>
1901                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1902                                 <retrieve/>
1903                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1904                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1905                         </actions>
1906                 </permacrud>
1907         </class>
1908
1909         <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">
1910                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1911                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1912                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1913                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1914                 </fields>
1915                 <links>
1916                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1917                 </links>
1918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1919                         <actions>
1920                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1921                                 <retrieve/>
1922                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1923                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1924                         </actions>
1925                 </permacrud>
1926         </class>
1927
1928         <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">
1929                 <fields oils_persist:primary="code">
1930                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1931                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1932                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1933                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1934                 </fields>
1935                 <links>
1936                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1937                 </links>
1938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1939                         <actions>
1940                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1941                                 <retrieve/>
1942                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1943                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1944                         </actions>
1945                 </permacrud>
1946         </class>
1947
1948         <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">
1949                 <fields oils_persist:primary="code">
1950                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1951                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1952                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1953                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1954                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1955                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1956                 </fields>
1957                 <links>
1958                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1959                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1960                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1961                 </links>
1962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1963                         <actions>
1964                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1965                                 <retrieve/>
1966                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1967                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1968                         </actions>
1969                 </permacrud>
1970         </class>
1971
1972     <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">
1973         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1974             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1975             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1976             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1977         </fields>
1978         <links>
1979             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1980             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1981         </links>
1982         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1983             <actions>
1984                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1985                 <retrieve/>
1986                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1987                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1988             </actions>
1989         </permacrud>
1990     </class>
1991
1992         <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">
1993                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1994                         <field name="active" reporter:datatype="bool"/>
1995                         <field name="create_date" reporter:datatype="timestamp"/>
1996                         <field name="creator" />
1997                         <field name="deleted" reporter:datatype="bool"/>
1998                         <field name="edit_date" reporter:datatype="timestamp"/>
1999                         <field name="editor" />
2000                         <field name="id" reporter:datatype="id" />
2001                         <field name="last_xact_id" />
2002                         <field name="marc" />
2003                         <field name="source" />
2004                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2005                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2006                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2007                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2008                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2009                 </fields>
2010                 <links>
2011                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2012                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2013                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2014                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2015                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2016                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2017                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2018                 </links>
2019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2020                         <actions>
2021                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2022                                 <retrieve/>
2023                                 <update permission="UPDATE_MARC" global_required="true"/>
2024                                 <delete permission="UPDATE_MARC" global_required="true"/>
2025                         </actions>
2026                 </permacrud>
2027         </class>
2028         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2029                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2030                         <field name="char_encoding" />
2031                         <field name="id" />
2032                         <field name="record" />
2033                         <field name="record_status" />
2034                         <field name="thesaurus" />
2035                 </fields>
2036                 <links>
2037                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2038                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2039                 </links>
2040         </class>
2041         <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">
2042                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2043                         <field name="id" reporter:datatype="id" />
2044                         <field name="bib" reporter:datatype="link" />
2045                         <field name="authority" reporter:datatype="link" />
2046                 </fields>
2047                 <links>
2048                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2049                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2050                 </links>
2051         </class>
2052         <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">
2053                 <fields oils_persist:primary="code" oils_persist:sequence="">
2054                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2055                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2056                 </fields>
2057                 <links/>
2058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2059             <actions>
2060                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2061                 <retrieve/>
2062                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2063                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2064             </actions>
2065         </permacrud>
2066         </class>
2067         <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">
2068                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2069                         <field name="accepting_usr" />
2070                         <field name="amount" reporter:datatype="money" />
2071                         <field name="amount_collected" reporter:datatype="money" />
2072                         <field name="approval_code" reporter:datatype="text"/>
2073                         <field name="cash_drawer" reporter:datatype="link"/>
2074                         <field name="cc_first_name" reporter:datatype="text"/>
2075                         <field name="cc_last_name" reporter:datatype="text"/>
2076                         <field name="cc_number" reporter:datatype="text"/>
2077                         <field name="cc_order_number" reporter:datatype="text"/>
2078                         <field name="cc_type" reporter:datatype="text"/>
2079                         <field name="cc_processor" reporter:datatype="text"/>
2080                         <field name="expire_month" reporter:datatype="int" />
2081                         <field name="expire_year" reporter:datatype="int" />
2082                         <field name="id" reporter:datatype="id" />
2083                         <field name="note" reporter:datatype="text"/>
2084                         <field name="payment_ts" reporter:datatype="timestamp"/>
2085                         <field name="xact" reporter:datatype="link"/>
2086                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2087                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2088                 </fields>
2089                 <links>
2090                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2091                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2092                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2093                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2094                 </links>
2095         </class>
2096         <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">
2097                 <fields oils_persist:primary="name">
2098                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2099                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2100                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2101                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2102                 </fields>
2103                 <links/>
2104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2105             <actions>
2106                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2107                 <retrieve/>
2108                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2109                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2110             </actions>
2111         </permacrud>
2112         </class>
2113
2114         <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">
2115                 <fields oils_persist:primary="alias">
2116                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2117                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2118                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2119                 </fields>
2120                 <links>
2121                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2122                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2123                 </links>
2124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2125             <actions>
2126                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2127                 <retrieve/>
2128                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2129                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2130             </actions>
2131         </permacrud>
2132         </class>
2133
2134         <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">
2135                 <fields oils_persist:primary="name">
2136                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2137                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2138                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2139                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2140                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2141                 </fields>
2142                 <links>
2143                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2144                 </links>
2145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2146             <actions>
2147                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2148                 <retrieve/>
2149                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2150                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2151             </actions>
2152         </permacrud>
2153         </class>
2154
2155         <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">
2156                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2157                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2158                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2159                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2160                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2161                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2162                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2163                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2164                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2165                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2166                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2167                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2168                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2169                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2170                 </fields>
2171                 <links>
2172                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2173                 </links>
2174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2175             <actions>
2176                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2177                 <retrieve/>
2178                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2179                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2180             </actions>
2181         </permacrud>
2182         </class>
2183         <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">
2184                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2185                         <field name="id" reporter:datatype="id" />
2186                         <field name="name" reporter:datatype="text"/>
2187                         <field name="xpath" reporter:datatype="text"/>
2188                         <field name="format" reporter:datatype="link"/>
2189                         <field name="first_word" reporter:datatype="bool" />
2190                 </fields>
2191                 <links/>
2192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2193             <actions>
2194                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2195                 <retrieve/>
2196                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2197                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2198             </actions>
2199         </permacrud>
2200         </class>
2201         <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">
2202                 <fields oils_persist:primary="code" oils_persist:sequence="">
2203                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2204                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2205                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2206                 </fields>
2207                 <links/>
2208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2209             <actions>
2210                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2211                 <retrieve/>
2212                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2213                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2214             </actions>
2215         </permacrud>
2216         </class>
2217         <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">
2218                 <fields oils_persist:primary="code" oils_persist:sequence="">
2219                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2220                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2221                 </fields>
2222                 <links/>
2223         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2224             <actions>
2225                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2226                 <retrieve/>
2227                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2228                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2229             </actions>
2230         </permacrud>
2231         </class>
2232     <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">
2233         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2234             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2235             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2236             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2237             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2238         </fields>
2239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2240             <actions>
2241                 <retrieve/>
2242             </actions>
2243         </permacrud>
2244     </class>
2245         <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">
2246                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2247                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2248                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2249                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2250                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2251                 </fields>
2252                 <links>
2253                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2254                 </links>
2255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2256             <actions>
2257                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2258                 <retrieve/>
2259                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2260                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2261             </actions>
2262         </permacrud>
2263         </class>
2264         <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">
2265                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2266                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2267                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2268                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2269                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2270                 </fields>
2271                 <links>
2272                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2273                 </links>
2274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2275             <actions>
2276                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2277                 <retrieve/>
2278                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2279                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2280             </actions>
2281         </permacrud>
2282         </class>
2283         <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">
2284                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2285                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2286                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2287                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2288                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2289                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2290                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2291                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2292                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2293                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2294                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2295                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2296                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2297                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2298                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2299                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2300                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2301                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2302                 </fields>
2303                 <links>
2304                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2305                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2306                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2307                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2308                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2309                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2310                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2311                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2312                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2313                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2314                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2315                 </links>
2316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2317             <actions>
2318                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2319                 <retrieve/>
2320                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2321                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2322             </actions>
2323         </permacrud>
2324         </class>
2325         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2326                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2327                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2328                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2329                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2330                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2331                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2332                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2333                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2334                 </fields>
2335                 <links>
2336                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2337                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2338         </links>
2339         </class>
2340         <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">
2341                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2342                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2343                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2344                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2345                 </fields>
2346                 <links>
2347                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2348                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2349                 </links>
2350         </class>
2351         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2352                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2353                         <field name="id" reporter:datatype="id" />
2354                         <field name="value" oils_persist:i18n="true" />
2355                 </fields>
2356                 <links/>
2357         </class>
2358         <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">
2359                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2360                         <field name="balance_owed" reporter:datatype="money" />
2361                         <field name="total_owed" reporter:datatype="money" />
2362                         <field name="total_paid" reporter:datatype="money" />
2363                         <field name="usr" reporter:datatype="link"/>
2364                 </fields>
2365                 <links>
2366                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2367         </links>
2368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2369             <actions>
2370                 <retrieve permission="VIEW_USER">
2371                     <context link="usr" field="home_ou"/>
2372                 </retrieve>
2373             </actions>
2374         </permacrud>
2375         </class>
2376         <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">
2377                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2378                         <field name="collector" />
2379                         <field name="enter_time" reporter:datatype="timestamp"/>
2380                         <field name="id" reporter:datatype="id" />
2381                         <field name="location" reporter:datatype="link"/>
2382                         <field name="usr" reporter:datatype="link"/>
2383                 </fields>
2384                 <links>
2385                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2386                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2387                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2388                 </links>
2389         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2390             <actions>
2391                 <create permission="money.collections_tracker.create" context_field="location"/>
2392                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2393                 <delete permission="money.collections_tracker.create" context_field="location"/>
2394             </actions>
2395         </permacrud>
2396         </class>
2397         <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">
2398                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2399                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2400                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2401                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2402                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2403                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2404                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2405                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2406                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2407                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2408                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2409                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2410                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2411                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2412                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2413                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2414                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2415                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2416                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2417                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2418                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2419                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2420                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2421                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2422                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2423                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2424                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2425                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2426                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2427                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2428                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2429                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2430                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2431                 </fields>
2432                 <links>
2433                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2434                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2435                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2436                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2437                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2438                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2439                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2440                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2441                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2442                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2443                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2444                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2445                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2446                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2447                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2448                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2449                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2450                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2451                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2452                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2453                 </links>
2454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2455             <actions>
2456                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2457                 <retrieve/>
2458                 <update permission="UPDATE_MARC" global_required="true"/>
2459             </actions>
2460         </permacrud>
2461         </class>
2462         <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">
2463                 <fields oils_persist:primary="id">
2464                         <field name="dow_0_close" />
2465                         <field name="dow_0_open" />
2466                         <field name="dow_1_close" />
2467                         <field name="dow_1_open" />
2468                         <field name="dow_2_close" />
2469                         <field name="dow_2_open" />
2470                         <field name="dow_3_close" />
2471                         <field name="dow_3_open" />
2472                         <field name="dow_4_close" />
2473                         <field name="dow_4_open" />
2474                         <field name="dow_5_close" />
2475                         <field name="dow_5_open" />
2476                         <field name="dow_6_close" />
2477                         <field name="dow_6_open" />
2478                         <field name="id" reporter:datatype="id" />
2479                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2480                 </fields>
2481                 <links>
2482                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2483                 </links>
2484         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2485             <actions>
2486                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2487                 <retrieve/>
2488                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2489                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2490             </actions>
2491         </permacrud>
2492         </class>
2493         <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">
2494                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2495                         <field name="id" reporter:datatype="id" />
2496                         <field name="record" reporter:datatype="link"/>
2497                         <field name="label" reporter:datatype="text"/>
2498                         <field name="label_sortkey" reporter:datatype="text"/>
2499                 </fields>
2500                 <links>
2501                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2502                 </links>
2503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2504             <actions>
2505                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2506                 <retrieve/>
2507                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2508                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2509             </actions>
2510         </permacrud>
2511         </class>
2512         <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">
2513                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2514                         <field name="id" reporter:datatype="id" />
2515                         <field name="target_copy" reporter:datatype="link" />
2516                         <field name="part" reporter:datatype="link"/>
2517                 </fields>
2518                 <links>
2519                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2520                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2521                 </links>
2522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2523             <actions>
2524                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2525                 <retrieve/>
2526                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2527                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2528             </actions>
2529         </permacrud>
2530         </class>
2531         <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">
2532                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2533                         <field name="close_end" reporter:datatype="timestamp" />
2534                         <field name="close_start" reporter:datatype="timestamp" />
2535                         <field name="id" reporter:datatype="id" />
2536                         <field name="org_unit" reporter:datatype="org_unit"/>
2537                         <field name="reason" reporter:datatype="text"/>
2538                 </fields>
2539                 <links>
2540                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2541                 </links>
2542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2543             <actions>
2544                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2545                 <retrieve/>
2546                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2547                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2548             </actions>
2549         </permacrud>
2550         </class>
2551         <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">
2552                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2553                         <field name="extended" reporter:datatype="interval"/>
2554                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2555                         <field name="max_renewals" reporter:datatype="int" />
2556                         <field name="name" reporter:datatype="text"/>
2557                         <field name="normal" reporter:datatype="interval"/>
2558                         <field name="shrt" reporter:datatype="interval"/>
2559                 </fields>
2560                 <links>
2561                 </links>
2562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2563             <actions>
2564                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2565                 <retrieve/>
2566                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2567                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2568             </actions>
2569         </permacrud>
2570         </class>
2571
2572         <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">
2573                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2574                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2575                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2576             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2577                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2578             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2579                 </fields>
2580                 <links>
2581             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2582                 </links>
2583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2584             <actions>
2585                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2586                 <retrieve/>
2587                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2588                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2589             </actions>
2590                 </permacrud>
2591         </class>
2592
2593         <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">
2594                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2595                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2596                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2597                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2598             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2599                 </fields>
2600                 <links>
2601                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2602                 </links>
2603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2604             <actions>
2605                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2606                 <retrieve/>
2607                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2608                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2609             </actions>
2610                 </permacrud>
2611         </class>
2612
2613         <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">
2614                 <fields oils_persist:primary="id" oils_persist:sequence="">
2615                         <field name="balance_owed" reporter:datatype="money"/>
2616                         <field name="id" reporter:datatype="id" />
2617                         <field name="last_billing_note" reporter:datatype="text"/>
2618                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2619                         <field name="last_billing_type" reporter:datatype="text"/>
2620                         <field name="last_payment_note" reporter:datatype="text"/>
2621                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2622                         <field name="last_payment_type" reporter:datatype="text"/>
2623                         <field name="total_owed" reporter:datatype="money"/>
2624                         <field name="total_paid" reporter:datatype="money"/>
2625                         <field name="usr" reporter:datatype="link"/>
2626                         <field name="xact_finish" reporter:datatype="timestamp" />
2627                         <field name="xact_start" reporter:datatype="timestamp" />
2628                         <field name="xact_type" reporter:datatype="text"/>
2629                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2630                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2631                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2632                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2633                         <field name="billing_location" reporter:datatype="link"/>
2634                 </fields>
2635                 <links>
2636                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2637                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2638                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2639                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2640                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2641                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2642                 </links>
2643         </class>
2644         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2645                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2646                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2647                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2648                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2649                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2650                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2651                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2652                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2653                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2654                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2655                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2656                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2657                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2658                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2659                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2660                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2661                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2662                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2663                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2664                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2665                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2666                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2667                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2668                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2669                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2670                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2671                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2672                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2673                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2674                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2675                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2676                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2677                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2678                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2679                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2680                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2681                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2682                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2683                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2684                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2685                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2686                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2687                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2688                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2689                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2690                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2691                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2692                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2693                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2694                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2695                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2696                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2697                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2699                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2700                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2701                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2702                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2703                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2704                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2705                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2706                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2707                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2708                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2709                 </fields>
2710                 <links>
2711                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2712                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2713                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2714                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2715                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2716                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2717                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2718                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2719                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2720                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2721                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2722                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2723                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2724                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2725                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2726                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2727                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2728                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2729                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2730                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2731                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2732                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2733                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2734                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2735                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2736                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2737                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2738                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2739                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2740                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2741                 </links>
2742         </class>
2743         <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">
2744                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2745                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2746                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2747                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2748                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2749                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2750                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2751                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2752                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2753         </fields>
2754                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2755                         <actions>
2756                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2757                                 <retrieve/>
2758                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2759                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2760                         </actions>
2761                 </permacrud>
2762         </class>
2763         <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">
2764                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2765                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2766                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2767                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2768                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2769         </fields>
2770         <links>
2771                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2772                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2773                 </links>
2774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2775                         <actions>
2776                                 <retrieve permission="RUN_REPORTS">
2777                                         <context link="usr" field="home_ou" />
2778                                 </retrieve>
2779                         </actions>
2780                 </permacrud>
2781         </class>
2782         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2783                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2784                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2785                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2786                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2787                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2788                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2789                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2790         </fields>
2791         <links>
2792                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2793                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2794                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2795                 </links>
2796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2797                         <actions>
2798                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2799                                         <context link="usr" field="home_ou" />
2800                                         <context link="ws" field="owning_lib" />
2801                                 </retrieve>
2802                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2803                                         <context link="usr" field="home_ou" />
2804                                         <context link="ws" field="owning_lib" />
2805                                 </create>
2806                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2807                                         <context link="usr" field="home_ou" />
2808                                         <context link="ws" field="owning_lib" />
2809                                 </update>
2810                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2811                                         <context link="usr" field="home_ou" />
2812                                         <context link="ws" field="owning_lib" />
2813                                 </delete>
2814                         </actions>
2815                 </permacrud>
2816         </class>
2817         <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">
2818                 <fields oils_persist:primary="name">
2819                         <field name="name" reporter:datatype="text"/>
2820                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2821                 </fields>
2822                 <links/>
2823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2824                         <actions>
2825                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2826                                 <retrieve/>
2827                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2828                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2829                         </actions>
2830                 </permacrud>
2831         </class>
2832         <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">
2833                 <fields oils_persist:primary="name">
2834                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2835                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2836                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2837                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2838                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2839                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2840                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2841                 </fields>
2842                 <links>
2843                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2844                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2845                 </links>
2846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2847                         <actions>
2848                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2849                                 <retrieve/>
2850                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2851                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2852                         </actions>
2853                 </permacrud>
2854         </class>
2855         <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">
2856                 <fields oils_persist:primary="name">
2857                         <field name="name" reporter:datatype="text"/>
2858                         <field name="label" reporter:datatype="text"/>
2859                         <field name="description" reporter:datatype="text"/>
2860                         <field name="datatype" reporter:datatype="text"/>
2861                         <field name="view_perm" reporter:datatype="link"/>
2862                         <field name="update_perm" reporter:datatype="link"/>
2863                         <field name="fm_class" reporter:datatype="text"/>
2864                         <field name="grp" reporter:datatype="link"/>
2865                 </fields>
2866                 <links>
2867                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2868                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2869                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2870                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2871                 </links>
2872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2873                         <actions>
2874                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2875                                 <retrieve/>
2876                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2877                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2878                         </actions>
2879                 </permacrud>
2880         </class>
2881         <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">
2882                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2883                         <field name="id" />
2884                         <field name="name"  reporter:datatype="text"/>
2885                         <field name="org_unit" reporter:datatype="org_unit"/>
2886                         <field name="value"  reporter:datatype="text"/>
2887                 </fields>
2888                 <links>
2889                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2890                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2891                 </links>
2892         </class>
2893         <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">
2894                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2895                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2896                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2897                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2898                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2899                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2900                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2901                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2902                 </fields>
2903                 <links>
2904                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2905                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2906                 </links>
2907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2908             <actions>
2909                 <create permission="CREATE_COPY_NOTE">
2910                     <context link="owning_copy" field="circ_lib"/>
2911                 </create>
2912                 <retrieve permission="VIEW_COPY_NOTES">
2913                     <context link="owning_copy" field="circ_lib"/>
2914                 </retrieve>
2915                 <update permission="UPDATE_COPY_NOTE">
2916                     <context link="owning_copy" field="circ_lib"/>
2917                 </update>
2918                 <delete permission="DELETE_COPY_NOTE">
2919                     <context link="owning_copy" field="circ_lib"/>
2920                 </delete>
2921             </actions>
2922         </permacrud>
2923         </class>
2924         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2925                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2926                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2927                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2928                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2929                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2930                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2931                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2932                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2933                 </fields>
2934                 <links>
2935                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2936                 </links>
2937         </class>
2938         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2939                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2940                         <field name="fingerprint"  reporter:datatype="text"/>
2941                         <field name="id" reporter:datatype="id" />
2942                         <field name="master_record" reporter:datatype="link"/>
2943                         <field name="mods"  reporter:datatype="text"/>
2944                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2945                 </fields>
2946                 <links>
2947                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2948                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2949                 </links>
2950         </class>
2951         <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">
2952                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2953                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2954                         <field name="name"  reporter:datatype="text"/>
2955                 </fields>
2956                 <links/>
2957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2958             <actions>
2959                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2960                 <retrieve/>
2961                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2962                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2963             </actions>
2964         </permacrud>
2965         </class>
2966         <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">
2967                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2968                         <field name="code"  reporter:datatype="text"/>
2969                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2970                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2971                 </fields>
2972                 <links/>
2973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2974             <actions>
2975                 <create permission="CREATE_PERM" global_required="true"/>
2976                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2977                 <update permission="UPDATE_PERM" global_required="true"/>
2978                 <delete permission="DELETE_PERM" global_required="true"/>
2979             </actions>
2980         </permacrud>
2981         </class>
2982         <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">
2983                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2984                         <field name="id" reporter:datatype="id" />
2985                         <field name="metarecord" reporter:datatype="link"/>
2986                         <field name="source" reporter:datatype="link"/>
2987                 </fields>
2988                 <links>
2989                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2990                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2991                 </links>
2992         </class>
2993         <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">
2994                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2995                         <field name="id" reporter:datatype="id" />
2996                         <field name="field" reporter:datatype="link"/>
2997                         <field name="source" reporter:datatype="link"/>
2998                         <field name="value"  reporter:datatype="text"/>
2999                 </fields>
3000                 <links>
3001                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3002                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3003                 </links>
3004         </class>
3005         <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">
3006                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3007                         <field name="id" reporter:datatype="id" />
3008                         <field name="value" reporter:datatype="text"/>
3009                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3010                 </fields>
3011                 <links>
3012                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3013                 </links>
3014         </class>
3015         <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">
3016                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3017                         <field name="id" reporter:datatype="id" />
3018                         <field name="entry" reporter:datatype="link"/>
3019                         <field name="def" reporter:datatype="link"/>
3020                         <field name="source" reporter:datatype="link"/>
3021                 </fields>
3022                 <links>
3023                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3024                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3025                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3026                 </links>
3027         </class>
3028         <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">
3029                 <oils_persist:source_definition>
3030                         SELECT * FROM metabib.author_field_entry
3031                                                 UNION ALL
3032                         SELECT * FROM metabib.keyword_field_entry
3033                                                 UNION ALL
3034                         SELECT * FROM metabib.identifier_field_entry
3035                                                 UNION ALL
3036                         SELECT * FROM metabib.title_field_entry
3037                                                 UNION ALL
3038                         SELECT * FROM metabib.subject_field_entry
3039                                                 UNION ALL
3040                         SELECT * FROM metabib.series_field_entry
3041                 </oils_persist:source_definition>
3042                 <fields>
3043                         <field name="field" reporter:datatype="link"/>
3044                         <field name="id" reporter:datatype="id" />
3045                         <field name="source" reporter:datatype="link"/>
3046                         <field name="value"  reporter:datatype="text"/>
3047                 </fields>
3048                 <links>
3049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3050                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3051                 </links>
3052         </class>
3053         <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">
3054                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3055                         <field name="field" reporter:datatype="link"/>
3056                         <field name="id" reporter:datatype="id" />
3057                         <field name="source" reporter:datatype="link"/>
3058                         <field name="value"  reporter:datatype="text"/>
3059                 </fields>
3060                 <links>
3061                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3062                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3063                 </links>
3064         </class>
3065         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3066                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3067                         <field name="accepting_usr" reporter:datatype="link"/>
3068                         <field name="amount" reporter:datatype="money" />
3069                         <field name="amount_collected" reporter:datatype="money" />
3070                         <field name="cash_drawer" reporter:datatype="link"/>
3071                         <field name="id" reporter:datatype="id" />
3072                         <field name="note"  reporter:datatype="text"/>
3073                         <field name="payment_ts" reporter:datatype="timestamp"/>
3074                         <field name="xact" reporter:datatype="link"/>
3075                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3076                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3077                 </fields>
3078                 <links>
3079                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3080                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3081                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3082                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3083                 </links>
3084         </class>
3085         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3086                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3087                         <field name="accepting_usr" reporter:datatype="link"/>
3088                         <field name="amount" reporter:datatype="money" />
3089                         <field name="amount_collected" reporter:datatype="money" />
3090                         <field name="id" reporter:datatype="id" />
3091                         <field name="note"  reporter:datatype="text"/>
3092                         <field name="payment_ts" reporter:datatype="timestamp"/>
3093                         <field name="xact" reporter:datatype="link"/>
3094                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3095                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3096                 </fields>
3097                 <links>
3098                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3099                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3100                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3101                 </links>
3102         </class>
3103         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3104                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3105                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3106                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3107                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3108                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3109                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3110                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3111                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3112                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3113                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3114                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3115                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3116                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3117                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3118                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3119                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3120                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3121                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3122                 </fields>
3123                 <links>
3124                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3125                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3126                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3127                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3128                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3129                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3130                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3131                 </links>
3132         </class>
3133
3134         <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">
3135                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3136                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3137                         <field name="name"  reporter:datatype="text"/>
3138                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3139                         <field name="block_list" reporter:datatype="text"/>
3140                         <field name="staff_alert" reporter:datatype="bool"/>
3141                         <field name="org_depth" reporter:datatype="int"/>
3142                 </fields>
3143                 <links/>
3144         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3145             <actions>
3146                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3147                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3148                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3149                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3150             </actions>
3151         </permacrud>
3152         </class>
3153         <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">
3154                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3155                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3156                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3157                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3158                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3159                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3160                 </fields>
3161                 <links>
3162                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3163                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3164                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3165         </links>
3166         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3167             <actions>
3168                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3169                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3170                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3171                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3172             </actions>
3173         </permacrud>
3174         </class>
3175         <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">
3176                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3177                         <field name="holdable" reporter:datatype="bool"/>
3178                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3179                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3180                         <field name="opac_visible" reporter:datatype="bool"/>
3181             <field name="copy_active" reporter:datatype="bool"/>
3182             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3183                 </fields>
3184                 <links/>
3185         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3186             <actions>
3187                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3188                 <retrieve/>
3189                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3190                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3191             </actions>
3192         </permacrud>
3193         </class>
3194         <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">
3195                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3196                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3197                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3198                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3199                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3200                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3201                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3202                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3203                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3204                 </fields>
3205                 <links>
3206                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3207                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3208                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3209                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3210                 </links>
3211                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3212                         <actions>
3213                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3214                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3215                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3216                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3217                         </actions>
3218                 </permacrud>
3219         </class>
3220         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3221                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3222                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3223                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3224                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3225                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3226                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3227                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3228                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3229                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3230                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3231                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3232                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3233                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3234                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3235                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3236                 </fields>
3237                 <links>
3238                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3239                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3240                 </links>
3241         </class>
3242         <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">
3243                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3244                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3245                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3246                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3247                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3248                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3249                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3250                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3251                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3252                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3253                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3254                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3255                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3256                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3257                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3258                 </fields>
3259                 <links>
3260                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3261                 </links>
3262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3263                         <actions>
3264                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3265                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3266                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3267                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3268                         </actions>
3269                 </permacrud>
3270         </class>
3271
3272
3273         <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">
3274                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3275                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3276                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3277                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3278                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3279                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3280                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3281                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3282                 </fields>
3283                 <links>
3284                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3285                 </links>
3286         </class>
3287
3288         <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">
3289                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3290                         <field name="call_number" />
3291                         <field name="create_date" reporter:datatype="timestamp"/>
3292                         <field name="creator" reporter:datatype="link"/>
3293                         <field name="id" reporter:datatype="id" />
3294                         <field name="pub" reporter:datatype="bool"/>
3295                         <field name="title"  reporter:datatype="text"/>
3296                         <field name="value"  reporter:datatype="text"/>
3297                 </fields>
3298                 <links>
3299                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3300                 </links>
3301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3302             <actions>
3303                 <create permission="CREATE_VOLUME_NOTE">
3304                     <context link="call_number" field="owning_lib"/>
3305                 </create>
3306                 <retrieve permission="VIEW_VOLUME_NOTES">
3307                     <context link="call_number" field="owning_lib"/>
3308                 </retrieve>
3309                 <update permission="UPDATE_VOLUME_NOTE">
3310                     <context link="call_number" field="owning_lib"/>
3311                 </update>
3312                 <delete permission="DELETE_VOLUME_NOTE">
3313                     <context link="call_number" field="owning_lib"/>
3314                 </delete>
3315             </actions>
3316         </permacrud>
3317         </class>
3318         <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">
3319                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3320                         <field name="create_date" reporter:datatype="timestamp"/>
3321                         <field name="creator" reporter:datatype="link"/>
3322                         <field name="edit_date" reporter:datatype="timestamp"/>
3323                         <field name="editor" reporter:datatype="link"/>
3324                         <field name="id" reporter:datatype="id" />
3325                         <field name="record" reporter:datatype="link"/>
3326                         <field name="value" reporter:datatype="text"/>
3327                 </fields>
3328                 <links>
3329                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3330                 </links>
3331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3332             <actions>
3333                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3334                 <retrieve/>
3335                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3336                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3337             </actions>
3338         </permacrud>
3339         </class>
3340         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3341         <oils_persist:source_definition>
3342 SELECT  usr,
3343         SUM(
3344             CASE
3345                 WHEN (
3346                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3347                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3348                 ) THEN 1
3349                 ELSE 0
3350             END
3351         ) AS out,
3352
3353         SUM(
3354             CASE
3355                 WHEN (
3356                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3357                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3358                 ) THEN 1
3359                 ELSE 0
3360             END
3361         ) AS overdue,
3362
3363         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3364         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3365         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3366   FROM  action.circulation
3367   WHERE checkin_time IS NULL
3368   GROUP BY 1
3369         </oils_persist:source_definition>
3370         <fields oils_persist:primary="usr">
3371             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3372             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3373             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3374             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3375             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3376             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3377         </fields>
3378         <links>
3379             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3380         </links>
3381         </class>
3382         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3383         <oils_persist:source_definition>
3384 SELECT  usr,
3385         ARRAY_TO_STRING(ARRAY_ACCUM(
3386             CASE
3387                 WHEN (
3388                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3389                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3390                 ) THEN id
3391                 ELSE 0
3392             END
3393         ),',') AS out,
3394
3395         ARRAY_TO_STRING(ARRAY_ACCUM(
3396             CASE
3397                 WHEN (
3398                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3399                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3400                 ) THEN id
3401                 ELSE 0
3402             END
3403         ),',') AS overdue,
3404
3405         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3406         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3407         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3408   FROM  action.circulation
3409   WHERE checkin_time IS NULL
3410   GROUP BY 1
3411         </oils_persist:source_definition>
3412         <fields oils_persist:primary="usr">
3413             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3414             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3415             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3416             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3417             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3418             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3419         </fields>
3420         <links>
3421             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3422         </links>
3423         </class>
3424         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3425                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3426                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3427                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3428                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3429                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3430                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3431                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3432                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3433                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3434                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3435                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3436                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3437                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3438                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3439                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3440                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3441                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3442                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3443                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3444                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3445                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3446                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3447                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3448                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3449                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3450                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3451                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3452                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3453                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3454                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3455                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3456                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3457                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3458                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3459                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3460                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3461                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3462                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3463                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3464                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3465                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3466                 </fields>
3467                 <links>
3468                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3469                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3470                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3471                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3472                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3473                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3474                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3475                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3476                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3477                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3478                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3479                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3480                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3481                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3482                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3483                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3484                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3485                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3486                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3487                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3488                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3489                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3490                 </links>
3491         </class>
3492         <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">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3494                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3495                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3496                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3497                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3498                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3499                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3500                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3501                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3502                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3503                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3504                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3505                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3506                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3507                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3508                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3509                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3510                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3511                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3512                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3513                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3514                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3515                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3516                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3517                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3518                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3519                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3520                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3521                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3522                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3523                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3524                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3525                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3526                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3527                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3528                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3529                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3530                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3531                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3532                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3533                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3534                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3535                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3536                 </fields>
3537                 <links>
3538                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3539                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3540                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3541                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3542                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3543                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3544                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3545                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3546                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3547                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3548                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3549                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3550                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3551                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3552                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3553                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3554                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3555                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3556                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3557                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3558                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3559                 </links>
3560         </class>
3561         <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">
3562                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3563                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3564                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3565                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3566                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3567                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3568                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3569                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3570                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3571                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3572                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3573                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3574                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3575                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3576                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3577                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3578                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3579                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3580                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3581                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3582                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3583                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3584                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3585                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3586                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3587                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3588                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3589                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3590                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3591                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3592                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3593                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3594                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3595                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3596                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3597                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3598                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3599                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3600                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3601                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3602                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3603                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3604                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3605                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3606                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3607                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3608                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3609                 </fields>
3610                 <links>
3611                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3612                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3613                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3614                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3615                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3616                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3617                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3618                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3619                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3620                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3621                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3622                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3623                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3624                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3625                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3626                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3627                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3628                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3629                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3630                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3631                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3632                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3633                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3634                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3635                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3636                 </links>
3637         </class>
3638
3639         <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">
3640                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3641                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3642                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3643                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3644                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3645                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3646                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3647                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3648                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3649                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3650                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3651                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3652                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3653                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3654                 </fields>
3655                 <links>
3656                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3657                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3658                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3659                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3660                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3661                 </links>
3662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3663                         <actions>
3664                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3665                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3666                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3667                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3668                         </actions>
3669                 </permacrud>
3670         </class>
3671
3672         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3673                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3674                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3675                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3676                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3677                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3678                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3679                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3680                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3681                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3682                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3683                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3684                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3685                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3686                 </fields>
3687                 <links>
3688                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3689                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3690                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3691                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3692                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3693                 </links>
3694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3695                         <actions>
3696                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3697                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3698                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3699                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3700                         </actions>
3701                 </permacrud>
3702         </class>
3703         
3704         <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">
3705                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3706                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3707                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3708                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3709                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3710                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3711                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3712                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3713                 </fields>
3714                 <links>
3715                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3716                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3717                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3718                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3719                 </links>
3720                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3721                         <actions>
3722                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3723                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3724                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3725                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3726                         </actions>
3727                 </permacrud>
3728         </class>
3729         
3730         <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">
3731                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3732                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3733                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3734                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3735                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3736                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3737                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3738                 </fields>
3739                 <links>
3740                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3741                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3742                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3743                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3744                 </links>
3745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3746                         <actions>
3747                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3748                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3749                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3750                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3751                         </actions>
3752                 </permacrud>
3753         </class>
3754         
3755         <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">
3756                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3757                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3758                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3759                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3760                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3761                 </fields>
3762                 <links>
3763                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3764                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3765                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3766                 </links>
3767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3768                         <actions>
3769                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3770                     <context link="resource" field="owner" />
3771                 </create>
3772                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3773                     <context link="resource" field="owner" />
3774                 </retrieve>
3775                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3776                     <context link="resource" field="owner" />
3777                 </update>
3778                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3779                     <context link="resource" field="owner" />
3780                 </delete>
3781                         </actions>
3782                 </permacrud>
3783         </class>
3784         
3785         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3786                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3787                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3788                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3789                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3790                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3791                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3792                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3793                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3794                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3795                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3796                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3797                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3798                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3799                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3800                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3801                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3802                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3803                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3804                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3805                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3806                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3807                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3808                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3809                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3810                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3811                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3812                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3813                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3814                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3815                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3816                 </fields>
3817                 <links>
3818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3819                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3820                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3821                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3822                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3823                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3824                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3825                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3826                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3827                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3828                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3829                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3830                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3831                 </links>
3832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3833                         <actions>
3834                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3835                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3836                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3837                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3838                         </actions>
3839                 </permacrud>
3840         </class>
3841         
3842         <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">
3843                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3844                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3845                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3846                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3847                 </fields>
3848                 <links>
3849                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3850                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3851                 </links>
3852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3853                         <actions>
3854                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3855                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3856                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3857                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3858                         </actions>
3859                 </permacrud>
3860         </class>
3861
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3864                         <field name="bucket" reporter:datatype="link"/>
3865                         <field name="id" reporter:datatype="id" />
3866                         <field name="target_call_number" reporter:datatype="link" />
3867                         <field name="create_time" reporter:datatype="timestamp" />
3868                         <field name="pos" reporter:datatype="int" />
3869                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3870                 </fields>
3871                 <links>
3872                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3873                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3874             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3875                 </links>
3876         </class>
3877         <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">
3878                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3879                         <field name="id" reporter:datatype="id" />
3880                         <field name="item" reporter:datatype="link"/>
3881                         <field name="note" reporter:datatype="text" />
3882                 </fields>
3883                 <links>
3884                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3885                 </links>
3886         </class>
3887         <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">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3889                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3890                         <field name="btype" reporter:datatype="text"/>
3891                         <field name="id" reporter:datatype="id" />
3892                         <field name="name" reporter:datatype="text"/>
3893                         <field name="description" reporter:datatype="text"/>
3894                         <field name="owner" reporter:datatype="link"/>
3895                         <field name="pub" reporter:datatype="bool"/>
3896                         <field name="create_time" reporter:datatype="timestamp" />
3897                 </fields>
3898                 <links>
3899                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3900                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3901                 </links>
3902         </class>
3903         <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">
3904                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3905                         <field name="id" reporter:datatype="id" />
3906                         <field name="bucket" reporter:datatype="link"/>
3907                         <field name="note" reporter:datatype="text" />
3908                 </fields>
3909                 <links>
3910                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3911                 </links>
3912         </class>
3913         <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">
3914                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3915                         <field name="hold" reporter:datatype="link"/>
3916                         <field name="id" reporter:datatype="id" />
3917                         <field name="target_copy" reporter:datatype="link"/>
3918                 </fields>
3919                 <links>
3920                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3921                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3922                 </links>
3923         </class>
3924         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3925                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3926                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3927                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3928                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3929                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3930                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3931                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3932                 </fields>
3933                 <links>
3934                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3935                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3936                 </links>
3937         </class>
3938         <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">
3939                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3940                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3941                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3942                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3943                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3944                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3945                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3946                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3947                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3948                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3949                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3950                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3951                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
3952                 </fields>
3953                 <links>
3954                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3955                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3956                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3957                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3958                 </links>
3959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3960             <actions>
3961                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3962                 <retrieve/>
3963                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3964                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3965             </actions>
3966         </permacrud>
3967         </class>
3968         <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">
3969                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
3970                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3971                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3972                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3973                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
3974             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3975             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
3976             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3977                 </fields>
3978                 <links>
3979                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3980                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
3981                 </links>
3982         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3983             <actions>
3984                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3985                 <retrieve/>
3986                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3987                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3988             </actions>
3989         </permacrud>
3990         </class>
3991         <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">
3992                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
3993                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3994             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
3995             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
3996                 </fields>
3997                 <links>
3998                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
3999                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4000                 </links>
4001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4002             <actions>
4003                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4004                                         <context link="lgroup" field="owner" />
4005                 </create>
4006                 <retrieve/>
4007                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4008                                         <context link="lgroup" field="owner" />
4009                 </update>
4010                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4011                                         <context link="lgroup" field="owner" />
4012                 </delete>
4013             </actions>
4014         </permacrud>
4015         </class>
4016
4017     <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">
4018         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4019             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4020             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4021             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4022             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4023         </fields>
4024         <links>
4025             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4026             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4027         </links>
4028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4029             <actions>
4030                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4031                 <retrieve/>
4032                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4033                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4034             </actions>
4035         </permacrud>
4036     </class>
4037
4038         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4039                 <fields>
4040                         <field name="sre_id" oils_persist:virtual="true" />
4041                         <field name="location" oils_persist:virtual="true" />
4042                         <field name="owning_lib" oils_persist:virtual="true" />
4043                         <field name="basic_holdings" oils_persist:virtual="true" />
4044                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4045                         <field name="supplement_holdings" oils_persist:virtual="true" />
4046                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4047                         <field name="index_holdings" oils_persist:virtual="true" />
4048                         <field name="index_holdings_add" oils_persist:virtual="true" />
4049                         <field name="online" oils_persist:virtual="true" />
4050                         <field name="missing" oils_persist:virtual="true" />
4051                         <field name="incomplete" oils_persist:virtual="true" />
4052                 </fields>
4053         </class>
4054
4055         <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">
4056                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4057                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4058                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4059                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4060                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4061                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4062                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4063                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4064                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4065                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4066                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4067                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4068                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4069                 </fields>
4070                 <links>
4071                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4072                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4073                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4074                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4075                 </links>
4076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4077                         <actions>
4078                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4079                                 <retrieve/>
4080                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4081                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4082                         </actions>
4083                 </permacrud>
4084         </class>
4085
4086         <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">
4087                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4088                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4089                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4090                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4091                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4092                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4093                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4094                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4095                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4096                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4097                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4098                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4099                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4100                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4101                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4102                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4103                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4104                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4105                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4106                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4107                 </fields>
4108                 <links>
4109                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4110                 </links>
4111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4112                         <actions>
4113                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4114                                         <context link="subscription" field="owning_lib" />
4115                                 </create>
4116                                 <retrieve />
4117                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4118                                         <context link="subscription" field="owning_lib" />
4119                                 </update>
4120                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4121                                         <context link="subscription" field="owning_lib" />
4122                                 </delete>
4123                         </actions>
4124                 </permacrud>
4125         </class>
4126
4127         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4128                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4129                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4130                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4131                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4132                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4133                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4134                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4135                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4136                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4137                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4138                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4139                 </fields>
4140                 <links>
4141                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4142                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4143                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4144                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4145                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4146                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4147                 </links>
4148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4149                         <actions>
4150                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4151                                 <retrieve />
4152                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4153                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4154                         </actions>
4155                 </permacrud>
4156         </class>
4157
4158         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4159                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4160                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4161                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4162                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4163                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4164                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4165                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4166                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4167                 </fields>
4168                 <links>
4169                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4170                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4171                 </links>
4172         </class>
4173
4174         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4175                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4176                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4177                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4178                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4179                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4180                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4181                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4182                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4183                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4184                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4185                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4186                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4187                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4188                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4189                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4190                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4191                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4192                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4193                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4194                 </fields>
4195                 <links>
4196                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4197                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4198                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4199                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4200                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4201                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4202                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4203                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4204                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4205                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4206                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4207                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4208                 </links>
4209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4210                         <actions>
4211                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4212                                 <retrieve />
4213                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4214                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4215                         </actions>
4216                 </permacrud>
4217         </class>
4218
4219         <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">
4220                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4221                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4222                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4223                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4224                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4225                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4226                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4227                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4228                 </fields>
4229                 <links>
4230                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4231                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4232                 </links>
4233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4234                         <actions>
4235                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4236                                         <context link="distribution" field="holding_lib" />
4237                                 </create>
4238                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4239                                         <context link="distribution" field="holding_lib" />
4240                                 </retrieve>
4241                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4242                                         <context link="distribution" field="holding_lib" />
4243                                 </update>
4244                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4245                                         <context link="distribution" field="holding_lib" />
4246                                 </delete>
4247                         </actions>
4248                 </permacrud>
4249         </class>
4250
4251         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4252                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4253                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4254                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4255                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4256                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4257                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4258                 </fields>
4259                 <links>
4260                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4261                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4262                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4263                 </links>
4264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4265                         <actions>
4266                                 <create permission="ADMIN_SERIAL_STREAM">
4267                                         <context link="distribution" field="holding_lib" />
4268                                 </create>
4269                                 <retrieve />
4270                                 <update permission="ADMIN_SERIAL_STREAM">
4271                                         <context link="distribution" field="holding_lib" />
4272                                 </update>
4273                                 <delete permission="ADMIN_SERIAL_STREAM">
4274                                         <context link="distribution" field="holding_lib" />
4275                                 </delete>
4276                         </actions>
4277                 </permacrud>
4278         </class>
4279
4280         <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">
4281                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4282                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4283                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4284                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4285                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4286                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4287                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4288                 </fields>
4289                 <links>
4290                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4291                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4292                 </links>
4293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4294                         <actions>
4295                                 <create permission="ADMIN_SERIAL_STREAM">
4296                                         <context link="stream" jump="distribution" field="holding_lib" />
4297                                 </create>
4298                                 <retrieve permission="RECEIVE_SERIAL">
4299                                         <context link="stream" jump="distribution" field="holding_lib" />
4300                                 </retrieve>
4301                                 <update permission="ADMIN_SERIAL_STREAM">
4302                                         <context link="stream" jump="distribution" field="holding_lib" />
4303                                 </update>
4304                                 <delete permission="ADMIN_SERIAL_STREAM">
4305                                         <context link="stream" jump="distribution" field="holding_lib" />
4306                                 </delete>
4307                         </actions>
4308                 </permacrud>
4309         </class>
4310
4311         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4312                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4313                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4314                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4315                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4316                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4317                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4318                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4319                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4320                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4321                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4322                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4323                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4324                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4325                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4326                 </fields>
4327                 <links>
4328                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4329                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4330                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4331                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4332                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4333                 </links>
4334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4335                         <actions>
4336                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4337                                         <context link="subscription" field="owning_lib" />
4338                                 </create>
4339                                 <retrieve/>
4340                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4341                                         <context link="subscription" field="owning_lib" />
4342                                 </update>
4343                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4344                                         <context link="subscription" field="owning_lib" />
4345                                 </delete>
4346                         </actions>
4347                 </permacrud>
4348         </class>
4349
4350         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4351                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4352                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4353                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4354                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4355                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4356                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4357                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4358                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4359                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4360                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4361                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4362                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4363                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4364                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4365                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4366                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4367                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4368                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4369                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4370                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4371                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4372                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4373                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4374                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4375                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4376                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4377                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4378                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4379                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4380                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4381                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4382                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4383                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4384                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4385                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4386                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4387                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4388                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4389                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4390                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4391                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4392                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4393                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4394                 </fields>
4395                 <links>
4396                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4397                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4398                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4399                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4400                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4401                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4402                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4403                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4404                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4405                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4406                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4407                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4408                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4409                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4410                 </links>
4411                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4412                         <actions>
4413                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4414                                 <retrieve/>
4415                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4416                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4417                         </actions>
4418                 </permacrud>
4419         </class>
4420
4421         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4422                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4423                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4424                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4425                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4426                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4427                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4428                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4429                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4430                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4431                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4432                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4433                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4434                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4435                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4436                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4437                 </fields>
4438                 <links>
4439                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4440                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4441                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4442                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4443                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4444                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4445                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4446                 </links>
4447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4448                         <actions>
4449                                 <create permission="ADMIN_SERIAL_ITEM">
4450                                         <context link="stream" jump="distribution" field="holding_lib" />
4451                                 </create>
4452                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4453                                         <context link="stream" jump="distribution" field="holding_lib" />
4454                                 </retrieve>
4455                                 <update permission="ADMIN_SERIAL_ITEM">
4456                                         <context link="stream" jump="distribution" field="holding_lib" />
4457                                 </update>
4458                                 <delete permission="ADMIN_SERIAL_ITEM">
4459                                         <context link="stream" jump="distribution" field="holding_lib" />
4460                                 </delete>
4461                         </actions>
4462                 </permacrud>
4463         </class>
4464
4465         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4466                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4467                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4468                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4469                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4470                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4471                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4472                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4473                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4474                 </fields>
4475                 <links>
4476                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4477                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4478                 </links>
4479                 <!-- Not available via PCRUD at this time -->
4480         </class>
4481         <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">
4482                 <fields>
4483                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4484                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4485                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4486                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4487                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4488                 </fields>
4489                 <links>
4490                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4491                 </links>
4492         </class>
4493         <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">
4494                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4495                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4496                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4497                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4498                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4499                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4500                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4501                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4502                 </fields>
4503                 <links>
4504                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4505                 </links>
4506         </class>
4507         <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">
4508                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4509                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4510                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4511                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4512                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4513                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4514                 </fields>
4515                 <links>
4516                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4517                 </links>
4518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4519                         <actions>
4520                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4521                                         <context link="distribution" field="holding_lib" />
4522                                 </create>
4523                                 <retrieve/>
4524                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4525                                         <context link="distribution" field="holding_lib" />
4526                                 </update>
4527                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4528                                         <context link="distribution" field="holding_lib" />
4529                                 </delete>
4530                         </actions>
4531                 </permacrud>
4532         </class>
4533
4534         <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">
4535                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4536                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4537                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4538                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4539                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4540                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4541                 </fields>
4542                 <links>
4543                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4544                 </links>
4545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4546                         <actions>
4547                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4548                                         <context link="distribution" field="holding_lib" />
4549                                 </create>
4550                                 <retrieve/>
4551                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4552                                         <context link="distribution" field="holding_lib" />
4553                                 </update>
4554                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4555                                         <context link="distribution" field="holding_lib" />
4556                                 </delete>
4557                         </actions>
4558                 </permacrud>
4559         </class>
4560
4561         <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">
4562                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4563                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4564                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4565                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4566                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4567                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4568                 </fields>
4569                 <links>
4570                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4571                 </links>
4572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4573                         <actions>
4574                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4575                                         <context link="distribution" field="holding_lib" />
4576                                 </create>
4577                                 <retrieve/>
4578                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4579                                         <context link="distribution" field="holding_lib" />
4580                                 </update>
4581                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4582                                         <context link="distribution" field="holding_lib" />
4583                                 </delete>
4584                         </actions>
4585                 </permacrud>
4586         </class>
4587
4588         <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">
4589                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4590                         <field name="id" reporter:datatype="id" />
4591                         <field name="owning_copy" reporter:datatype="link"/>
4592                         <field name="stat_cat" reporter:datatype="link"/>
4593                         <field name="stat_cat_entry" reporter:datatype="link"/>
4594                 </fields>
4595                 <links>
4596                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4597                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4598                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4599                 </links>
4600         </class>
4601         <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">
4602                 <fields oils_persist:primary="code">
4603                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4604                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4605                 </fields>
4606                 <links/>
4607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4608             <actions>
4609                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4610                 <retrieve/>
4611                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4612                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4613             </actions>
4614         </permacrud>
4615         </class>
4616         <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">
4617                 <fields oils_persist:primary="code">
4618                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4619                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4620                 </fields>
4621                 <links/>
4622         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4623             <actions>
4624                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4625                 <retrieve/>
4626                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4627                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4628             </actions>
4629         </permacrud>
4630         </class>
4631         <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">
4632                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4633                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4634                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4635                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4636                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4637                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4638                 </fields>
4639                 <links>
4640             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4641         </links>
4642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4643             <actions>
4644                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4645                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4646                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4647                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4648             </actions>
4649         </permacrud>
4650         </class>
4651         <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">
4652                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4653                         <field name="id" reporter:datatype="id" />
4654                         <field name="name" reporter:datatype="text"/>
4655                 </fields>
4656                 <links/>
4657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4658             <actions>
4659                 <create permission="CREATE_LASSO" global_required="true"/>
4660                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4661                 <update permission="UPDATE_LASSO" global_required="true"/>
4662                 <delete permission="DELETE_LASSO" global_required="true"/>
4663             </actions>
4664         </permacrud>
4665         </class>
4666         <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">
4667                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4668                         <field name="id" reporter:datatype="id" />
4669                         <field name="lasso" reporter:datatype="link"/>
4670                         <field name="org_unit" reporter:datatype="org_unit"/>
4671                 </fields>
4672                 <links>
4673                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4674                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4675                 </links>
4676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4677             <actions>
4678                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4679                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4680                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4681                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4682             </actions>
4683         </permacrud>
4684         </class>
4685         <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">
4686                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4687                         <field name="id" reporter:datatype="id" />
4688                         <field name="from_org" reporter:datatype="org_unit"/>
4689                         <field name="to_org" reporter:datatype="org_unit"/>
4690                         <field name="prox" reporter:datatype="int" />
4691                 </fields>
4692                 <links>
4693                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4694                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4695                 </links>
4696         </class>
4697         <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">
4698                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4699                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4700                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4701                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4702                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4703                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4704                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4705                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4706                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4707                 </fields>
4708                 <links/>
4709         </class>
4710         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4711                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4712                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4713                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4714                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4715                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4716                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4717                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4718                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4719                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4720                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4721                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4722                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4723                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4724                 </fields>
4725                 <links>
4726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4727                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4728                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4729                 </links>
4730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4731             <actions>
4732                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4733                 <retrieve/>
4734                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4735                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4736             </actions>
4737         </permacrud>
4738         </class>
4739         <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">
4740                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4741                         <field name="address_type"  reporter:datatype="text"/>
4742                         <field name="city"  reporter:datatype="text"/>
4743                         <field name="country"  reporter:datatype="text"/>
4744                         <field name="county"  reporter:datatype="text"/>
4745                         <field name="id" reporter:datatype="id" />
4746                         <field name="org_unit" reporter:datatype="org_unit"/>
4747                         <field name="post_code"  reporter:datatype="text"/>
4748                         <field name="state"  reporter:datatype="text"/>
4749                         <field name="street1"  reporter:datatype="text"/>
4750                         <field name="street2"  reporter:datatype="text"/>
4751                         <field name="valid" reporter:datatype="bool"/>
4752                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4753                 </fields>
4754                 <links>
4755                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4756                 </links>
4757         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4758             <actions>
4759                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4760                 <retrieve/>
4761                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4762                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4763             </actions>
4764         </permacrud>
4765         </class>
4766         <!-- A note: Please update alhr when updating ahr -->
4767         <class id="ahr" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
4768                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4769                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4770                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4771                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4772                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4773                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4774                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4775                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4776                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4777                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4778                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4779                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4780                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4781                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4782                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4783                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="text"/>
4784                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4785                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4786                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4787                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4788                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4789                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4790                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4791                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4792                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4793                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4794                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4795                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4796                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4797                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4798                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4799                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4800                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4801                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4802                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4803                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4804                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4805                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4806                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4807                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4808                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4809                 </fields>
4810                 <links>
4811                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4812                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4813                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4814                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4815                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4816                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4817                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4818                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4819                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4820                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4821                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4822                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4823                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4824                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4825                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4826                         <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
4827                 </links>
4828         </class>
4829         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4830                 <oils_persist:source_definition>
4831                         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)
4832                 </oils_persist:source_definition>
4833                 <fields oils_persist:primary="id">
4834                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4835                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4836                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4837                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4838                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4839                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4840                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4841                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4842                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4843                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4844                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4845                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4846                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4847                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4848                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4849                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4850                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4851                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4852                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4853                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4854                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4855                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4856                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4857                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4858                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4859                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4860                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4861                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4862                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4863                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4864                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4865                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4866                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4867                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4868                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4869                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4870                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4871                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4872                 </fields>
4873                 <links>
4874                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4875                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4876                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4877                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4878                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4879                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4880                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4881                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4882                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4883                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4884                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4885                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4886                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4887                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4888                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4889                 </links>
4890         </class>
4891
4892         <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">
4893                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4894                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4895                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4896                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4897                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4898                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4899                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4900                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4901                 </fields>
4902                 <links>
4903                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4904                 </links>
4905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4906                         <actions>
4907                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4908                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4909                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4910                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4911                         </actions>
4912                 </permacrud>
4913         </class>
4914         <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">
4915                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4916                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4917                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4918                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4919                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4920                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4921                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4922                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4923                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4924                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4925                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4926                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4927                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4928                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4929                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4930                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4931                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4932                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4933                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4934                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4935                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4936                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4937                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4938                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4939                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4940                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4941                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4942                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4943                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4945                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4946                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4947                 </fields>
4948                 <links>
4949                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4950                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4951                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4952                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4953                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4954                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4955                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4956                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4957                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4958                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4959                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4960                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4961                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4962                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4963                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4964                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4965                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4966                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4967                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4968                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4969                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4970                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4971                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4972                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4973                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4974                 </links>
4975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4976             <actions>
4977                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4978                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4979                     <context field="id"/>
4980                     <context field="parent_ou"/>
4981                                 </retrieve>
4982                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4983                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4984             </actions>
4985         </permacrud>
4986         </class>
4987         <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">
4988                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
4989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4990                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4991                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
4992                 </fields>
4993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4994                         <actions>
4995                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
4996                                 <retrieve/>
4997                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
4998                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
4999                         </actions>
5000                 </permacrud>
5001         </class>
5002         <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">
5003                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5004                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5005                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5006                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5007                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5008                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5009                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5010                 </fields>
5011                 <links>
5012                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5013                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5014                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5015                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5016                 </links>
5017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5018                         <actions>
5019                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5020                                 <retrieve/>
5021                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5022                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5023                         </actions>
5024                 </permacrud>
5025         </class>
5026         <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">
5027                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5028                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5029                         <field name="btype" reporter:datatype="text"/>
5030                         <field name="id" reporter:datatype="id" />
5031                         <field name="name"  reporter:datatype="text"/>
5032                         <field name="description" reporter:datatype="text"/>
5033                         <field name="owner" reporter:datatype="link"/>
5034                         <field name="pub" reporter:datatype="bool"/>
5035                         <field name="create_time" reporter:datatype="timestamp" />
5036                 </fields>
5037                 <links>
5038                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5039                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5040                 </links>
5041         </class>
5042         <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">
5043                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5044                         <field name="id" reporter:datatype="id" />
5045                         <field name="bucket" reporter:datatype="link"/>
5046                         <field name="note" reporter:datatype="text" />
5047                 </fields>
5048                 <links>
5049                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5050                 </links>
5051         </class>
5052         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5053                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5054                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5055                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5056                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5057                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5058                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5059                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5060                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5061                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5062                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5063                 </fields>
5064                 <links>
5065                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5066                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5067                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5068                 </links>
5069         </class>
5070         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5071                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5072                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5073                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5074                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5075                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5076                 </fields>
5077                 <links>
5078                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5079                 </links>
5080         </class>
5081     <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">
5082         <fields oils_persist:primary="field">
5083             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5084             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5085             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5086         </fields>
5087         <links/>
5088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5089             <actions>
5090                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5091                 <retrieve />
5092                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5093                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5094             </actions>
5095         </permacrud>
5096     </class>
5097         <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">
5098                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5099                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5100                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5101                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5102                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5103                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5104                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5105                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5106                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5107                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5108                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5109                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5110                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5111                 </fields>
5112                 <links>
5113                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5114                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5115                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5116                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5117                 </links>
5118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5119             <actions>
5120                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5121                 <retrieve />
5122                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5123                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5124             </actions>
5125         </permacrud>
5126         </class>
5127         <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">
5128                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5129                         <field name="field" reporter:datatype="link"/>
5130                         <field name="id" reporter:datatype="id" />
5131                         <field name="source" reporter:datatype="link"/>
5132                         <field name="value"  reporter:datatype="text"/>
5133                 </fields>
5134                 <links>
5135                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5136                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5137                 </links>
5138         </class>
5139         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5141                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5142                         <field name="btype" reporter:datatype="text"/>
5143                         <field name="id" reporter:datatype="id" />
5144                         <field name="name"  reporter:datatype="text"/>
5145                         <field name="description" reporter:datatype="text"/>
5146                         <field name="owner" reporter:datatype="link"/>
5147                         <field name="pub" reporter:datatype="bool"/>
5148                         <field name="create_time" reporter:datatype="timestamp" />
5149                 </fields>
5150                 <links>
5151                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5152                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5153                 </links>
5154         </class>
5155         <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">
5156                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5157                         <field name="id" reporter:datatype="id" />
5158                         <field name="bucket" reporter:datatype="link"/>
5159                         <field name="note" reporter:datatype="text" />
5160                 </fields>
5161                 <links>
5162                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5163                 </links>
5164         </class>
5165         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5166                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5167                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5168                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5169                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5170                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5171                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5172                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5174                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5175                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5176                 </fields>
5177                 <links>
5178                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5179                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5180                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5181                 </links>
5182         </class>
5183         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5184                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5185                         <field name="id" reporter:datatype="id" />
5186                         <field name="ind1" />
5187                         <field name="ind2" />
5188                         <field name="record" />
5189                         <field name="subfield" />
5190                         <field name="tag" />
5191                         <field name="value" />
5192                 </fields>
5193                 <links>
5194                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5195                 </links>
5196         </class>
5197         <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">
5198                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5199                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5200                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5201                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5202                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5203                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5204                 </fields>
5205                 <links>
5206                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5207                 </links>
5208         </class>
5209         <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">
5210                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5211                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5212                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5213                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5214                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5215                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5216                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5217                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5218                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5219                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5220                 </fields>
5221                 <links>
5222                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5223                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5224                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5225                 </links>
5226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5227             <actions>
5228                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5229                 <retrieve/>
5230                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5231                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5232             </actions>
5233         </permacrud>
5234         </class>
5235         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5236                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5237                         <field name="create_date" reporter:datatype="timestamp"/>
5238                         <field name="creator" reporter:datatype="link"/>
5239                         <field name="edit_date" reporter:datatype="timestamp"/>
5240                         <field name="editor" reporter:datatype="link"/>
5241                         <field name="id" reporter:datatype="id" />
5242                         <field name="pub" reporter:datatype="bool"/>
5243                         <field name="record" reporter:datatype="link"/>
5244                         <field name="value"  reporter:datatype="text"/>
5245                 </fields>
5246                 <links>
5247                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5248                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5249                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5250                 </links>
5251         </class>
5252         <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">
5253                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5254                         <field name="balance_owed" reporter:datatype="money" />
5255                         <field name="total_owed" reporter:datatype="money" />
5256                         <field name="total_paid" reporter:datatype="money" />
5257                         <field name="usr" reporter:datatype="link"/>
5258                 </fields>
5259                 <links>
5260                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5261                 </links>
5262         </class>
5263         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5264                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5265                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5266                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5267                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5268                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5269                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5270                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5271                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5272                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5273                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5274                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5275                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5276                 </fields>
5277                 <links>
5278                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5279                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5280                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5281                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5282                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5283                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5284                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5285                 </links>
5286         </class>
5287         <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">
5288                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5289                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5290                         <field name="quality" reporter:datatype="int" />
5291                         <field name="source" reporter:datatype="text"/>
5292                         <field name="transcendant" reporter:datatype="bool"/>
5293                         <field name="can_have_copies" reporter:datatype="bool"/>
5294                 </fields>
5295                 <links/>
5296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5297             <actions>
5298                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5299                 <retrieve/>
5300                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5301                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5302             </actions>
5303         </permacrud>
5304         </class>
5305         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5306                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5307                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5308                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5309                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5310                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5311                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5312                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5313                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5314                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5315                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5317                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5318                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5319                 </fields>
5320                 <links>
5321                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5322                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5323                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5324                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5325                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5326                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5327                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5328                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5329                 </links>
5330         </class>
5331         <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">
5332                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5333                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5334                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5335                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5336                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5337                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5338                 </fields>
5339                 <links>
5340                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5341                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5342                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5343                 </links>
5344         </class>
5345         <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">
5346                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5347                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5348                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5349                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5350                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5351                 </fields>
5352                 <links>
5353                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5354                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5355                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5356                 </links>
5357         </class>
5358         <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">
5359                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5360                         <field name="bucket" reporter:datatype="link"/>
5361                         <field name="id" reporter:datatype="id" />
5362                         <field name="target_user" reporter:datatype="link"/>
5363                         <field name="create_time" reporter:datatype="timestamp" />
5364                         <field name="pos" reporter:datatype="int" />
5365                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5366                 </fields>
5367                 <links>
5368                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5369                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5370             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5371                 </links>
5372         </class>
5373         <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">
5374                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5375                         <field name="id" reporter:datatype="id" />
5376                         <field name="item" reporter:datatype="link"/>
5377                         <field name="note" reporter:datatype="text" />
5378                 </fields>
5379                 <links>
5380                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5381                 </links>
5382         </class>
5383         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5384                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5385                         <field name="balance_owed" reporter:datatype="money" />
5386                         <field name="total_owed" reporter:datatype="money" />
5387                         <field name="total_paid" reporter:datatype="money" />
5388                         <field name="usr" reporter:datatype="link"/>
5389                 </fields>
5390                 <links>
5391                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5392                 </links>
5393         </class>
5394         <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">
5395                 <fields oils_persist:primary="code" oils_persist:sequence="">
5396                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5397                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5398                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5399                 </fields>
5400                 <links/>
5401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5402             <actions>
5403                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5404                 <retrieve/>
5405                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5406                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5407             </actions>
5408         </permacrud>
5409         </class>
5410         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5411                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5412                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5413                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5414                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5415                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5416                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5417                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5418                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5419                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5420                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5421                 </fields>
5422                 <links>
5423                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5424                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5425                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5426                 </links>
5427         </class>
5428         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5429                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5430                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5431                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5432                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5433                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5434                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5435                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5436                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5437                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5438                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5439                 </fields>
5440                 <links>
5441                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5442                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5443                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5444                 </links>
5445         </class>
5446         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5447                 <fields oils_persist:primary="id" oils_persist:sequence="">
5448                         <field name="checkin_lib" reporter:datatype="link"/>
5449                         <field name="checkin_staff" reporter:datatype="link"/>
5450                         <field name="checkin_time" reporter:datatype="timestamp"/>
5451                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5452                         <field name="circ_staff" reporter:datatype="link"/>
5453                         <field name="desk_renewal" reporter:datatype="bool"/>
5454                         <field name="due_date" reporter:datatype="timestamp"/>
5455                         <field name="duration" reporter:datatype="interval"/>
5456                         <field name="duration_rule" reporter:datatype="link"/>
5457                         <field name="fine_interval" reporter:datatype="interval"/>
5458                         <field name="id" reporter:datatype="id" />
5459                         <field name="max_fine" reporter:datatype="money" />
5460                         <field name="max_fine_rule" reporter:datatype="link"/>
5461                         <field name="opac_renewal" reporter:datatype="bool"/>
5462                         <field name="phone_renewal" reporter:datatype="bool"/>
5463                         <field name="recurring_fine" reporter:datatype="money" />
5464                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5465                         <field name="renewal_remaining" reporter:datatype="int" />
5466             <field name="grace_period" reporter:datatype="interval" />
5467                         <field name="stop_fines" reporter:datatype="text"/>
5468                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5469                         <field name="target_copy" reporter:datatype="link"/>
5470                         <field name="usr" reporter:datatype="link"/>
5471                         <field name="xact_finish" reporter:datatype="timestamp" />
5472                         <field name="xact_start" reporter:datatype="timestamp" />
5473                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5474                 </fields>
5475                 <links>
5476                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5477                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5478                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5479                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5480                 </links>
5481         </class>
5482         <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">
5483                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5484                         <field name="field" reporter:datatype="link"/>
5485                         <field name="id" reporter:datatype="id" />
5486                         <field name="source" reporter:datatype="link"/>
5487                         <field name="value" reporter:datatype="text"/>
5488                 </fields>
5489                 <links>
5490                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5491                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5492                 </links>
5493         </class>
5494         <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">
5495                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5496                         <field name="high" reporter:datatype="money" />
5497                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5498                         <field name="low" reporter:datatype="money" />
5499                         <field name="name" reporter:datatype="text"/>
5500                         <field name="normal" reporter:datatype="money" />
5501                         <field name="recurrence_interval" reporter:datatype="interval"/>
5502             <field name="grace_period" reporter:datatype="interval" />
5503                 </fields>
5504                 <links/>
5505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5506             <actions>
5507                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5508                 <retrieve/>
5509                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5510                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5511             </actions>
5512         </permacrud>
5513         </class>
5514         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5515                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5516                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5517                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5518                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5519                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5520                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5521                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5522                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5523                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5524                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5525                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5526                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5527                 </fields>
5528                 <links>
5529                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5530                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5531                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5532                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5533                 </links>
5534         </class>
5535         <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">
5536                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5537                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5538                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5539                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5540                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5541                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5542                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5543                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5544                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5545                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5546                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5547                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5548                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5549                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5550                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5551                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5552                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5553                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5554                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5555                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5556                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5557                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5558                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5559                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5560                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5561                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5562                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5563                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5564                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5565                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5566                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5567                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5568                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5569                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5570                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5571                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5572                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5573                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5574                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5575                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5576                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5577                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5578                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5579                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5580                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5581                 </fields>
5582                 <links>
5583                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5584                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5585                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5586                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5587                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5588                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5589                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5590                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5591                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5592                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5593                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5594                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5595                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5596                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5597                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5598                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5599                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5600                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5601                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5602                 </links>
5603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5604             <actions>
5605                 <create permission="CREATE_COPY">
5606                     <context link="call_number" field="owning_lib"/>
5607                 </create>
5608                 <retrieve/>
5609                 <update permission="UPDATE_COPY">
5610                     <context link="call_number" field="owning_lib"/>
5611                 </update>
5612                 <delete permission="DELETE_COPY">
5613                     <context link="call_number" field="owning_lib"/>
5614                 </delete>
5615             </actions>
5616         </permacrud>
5617         </class>
5618
5619         <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">
5620                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5621                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5622                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5623                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5624                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5625                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5626                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5627                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5628                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5629                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5630                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5631                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5632                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5633                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5634                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5635                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5636                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5637                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5638                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5639                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5640                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5641                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5642                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5643                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5644                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5645                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5646                 </fields>
5647                 <links>
5648                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5649                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5650                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5651                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5652                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5653                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5654                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5655                 </links>
5656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5657                         <actions>
5658                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5659                                 <retrieve />
5660                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5661                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5662                         </actions>
5663                 </permacrud>
5664         </class>
5665
5666         <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">
5667                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5668                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5669                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5670                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5671                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5672                 </fields>
5673                 <links/>
5674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5675             <actions>
5676                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5677                 <retrieve/>
5678                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5679                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5680             </actions>
5681         </permacrud>
5682         </class>
5683         <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">
5684                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5685                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5686                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5687                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5688                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5689                 </fields>
5690                 <links/>
5691         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5692             <actions>
5693                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5694                 <retrieve/>
5695                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5696                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5697             </actions>
5698         </permacrud>
5699         </class>
5700         <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">
5701                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5702                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5703                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5704                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5705                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5706                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5707                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5708                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5709                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5710                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5711                 </fields>
5712                 <links>
5713                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5714                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5715                 </links>
5716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5717             <actions>
5718                 <create permission="CREATE_PERM" global_required="true"/>
5719                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5720                 <update permission="UPDATE_PERM" global_required="true"/>
5721                 <delete permission="DELETE_PERM" global_required="true"/>
5722             </actions>
5723         </permacrud>
5724         </class>
5725         <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">
5726                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5727                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5728                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5729                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5730                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5731                 </fields>
5732                 <links>
5733                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5734                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5735                 </links>
5736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5737             <actions>
5738                 <create permission="ADMIN_SURVEY">
5739                     <context link="question" jump="survey" field="owner"/>
5740                 </create>
5741                 <retrieve/>
5742                 <update permission="ADMIN_SURVEY">
5743                     <context link="question" jump="survey" field="owner"/>
5744                 </update>
5745                 <delete permission="ADMIN_SURVEY">
5746                     <context link="question" jump="survey" field="owner"/>
5747                 </delete>
5748             </actions>
5749         </permacrud>
5750         </class>
5751         <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">
5752                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5753                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5754                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5755                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5756                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5757                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5758                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5759                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5760                 </fields>
5761                 <links>
5762                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5763                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5764                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5765                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5766                 </links>
5767         </class>
5768         <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">
5769                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5770                         <field name="balance_owed" reporter:datatype="money" />
5771                         <field name="total_owed" reporter:datatype="money" />
5772                         <field name="total_paid" reporter:datatype="money" />
5773                         <field name="usr" reporter:datatype="link"/>
5774                 </fields>
5775                 <links>
5776                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5777                 </links>
5778         </class>
5779         <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">
5780                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5781                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5782                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5783                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5784                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5785                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5786                 </fields>
5787                 <links>
5788                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5789                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5790                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5791                 </links>
5792         </class>
5793         <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">
5794                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5795                         <field name="field" reporter:datatype="link"/>
5796                         <field name="id" reporter:datatype="id" />
5797                         <field name="source" reporter:datatype="link"/>
5798                         <field name="value" reporter:datatype="text"/>
5799                 </fields>
5800                 <links>
5801                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5802                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5803                 </links>
5804         </class>
5805         <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">
5806                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5807                         <field name="field" reporter:datatype="link"/>
5808                         <field name="id" reporter:datatype="id" />
5809                         <field name="source" reporter:datatype="link"/>
5810                         <field name="value" reporter:datatype="text"/>
5811                 </fields>
5812                 <links>
5813                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5814                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5815                 </links>
5816         </class>
5817         <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">
5818                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5819                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5820                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5821                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5822                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5823                 </fields>
5824                 <links>
5825                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5826                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5827                 </links>
5828         </class>
5829         <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">
5830                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5831                         <field name="depth" reporter:datatype="int" />
5832                         <field name="grantable" reporter:datatype="bool"/>
5833                         <field name="grp" reporter:datatype="link"/>
5834                         <field name="id" reporter:datatype="id" />
5835                         <field name="perm" reporter:datatype="link"/>
5836                 </fields>
5837                 <links>
5838                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5839                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5840                 </links>
5841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5842             <actions>
5843                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5844                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5845                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5846                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5847             </actions>
5848         </permacrud>
5849         </class>
5850         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5851                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5852                         <field name="items" oils_persist:virtual="true" />
5853                         <field name="btype" reporter:datatype="text"/>
5854                         <field name="id" reporter:datatype="id" />
5855                         <field name="name" reporter:datatype="text"/>
5856                         <field name="description" reporter:datatype="text"/>
5857                         <field name="owner" reporter:datatype="link"/>
5858                         <field name="pub" reporter:datatype="bool"/>
5859                         <field name="create_time" reporter:datatype="timestamp" />
5860                 </fields>
5861                 <links>
5862                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5863                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5864                 </links>
5865         </class>
5866         <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">
5867                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5868                         <field name="id" reporter:datatype="id" />
5869                         <field name="bucket" reporter:datatype="link"/>
5870                         <field name="note" reporter:datatype="text" />
5871                 </fields>
5872                 <links>
5873                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5874                 </links>
5875         </class>
5876         <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">
5877                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5878                         <field name="id" reporter:datatype="int" />
5879                         <field name="usr" reporter:datatype="link"/>
5880                         <field name="work_ou" reporter:datatype="link"/>
5881                 </fields>
5882                 <links>
5883                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5884                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5885                 </links>
5886         </class>
5887         <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">
5888                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5889                         <field name="depth" reporter:datatype="int"/>
5890                         <field name="grantable" reporter:datatype="bool"/>
5891                         <field name="id" reporter:datatype="id" />
5892                         <field name="perm" reporter:datatype="link"/>
5893                         <field name="usr" reporter:datatype="link"/>
5894                 </fields>
5895                 <links>
5896                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5897                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5898                 </links>
5899         </class>
5900         <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">
5901                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5902                         <field name="object_id" reporter:datatype="text"/>
5903                         <field name="grantable" reporter:datatype="bool"/>
5904                         <field name="id" reporter:datatype="id" />
5905                         <field name="perm" reporter:datatype="link"/>
5906                         <field name="usr" reporter:datatype="link"/>
5907                         <field name="object_type" reporter:datatype="text"/>
5908                 </fields>
5909                 <links>
5910                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5911                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5912                 </links>
5913         </class>
5914         <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">
5915                 <fields oils_persist:primary="id" oils_persist:sequence="">
5916                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5917                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5918                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5919                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5920                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5921                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5922                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5923                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5924                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5925                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5926                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5927                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5928                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5929                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5930                 </fields>
5931                 <links>
5932                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5933                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5934                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5935                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5936                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5937                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5938                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5939                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5940                 </links>
5941         </class>
5942         <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">
5943                 <fields oils_persist:primary="id" oils_persist:sequence="">
5944                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5945                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5946                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5947                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5948                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5949                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5950                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5951                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5952                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5953                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5954                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5955                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5956                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5957                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5958                 </fields>
5959                 <links>
5960                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5961                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5962                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5963                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5964                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5965                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5966                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5967                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5968                 </links>
5969         </class>
5970         <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">
5971                 <fields oils_persist:primary="id" oils_persist:sequence="">
5972                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5973                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5974                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5975                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5976                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5977                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5978                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5979                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5980                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5981                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5982                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5983                 </fields>
5984                 <links>
5985                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5986                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5987                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5988                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5989                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5990                 </links>
5991         </class>
5992         <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">
5993                 <fields oils_persist:primary="id" oils_persist:sequence="">
5994                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5995                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5996                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5997                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5998                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5999                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6000                         <field reporter:label="Accepting User" name="accepting_usr" />
6001                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6002                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6003                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6004                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6005                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6006                 </fields>
6007                 <links>
6008                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6009                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6010                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6011                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6012                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6013                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6014                 </links>
6015         </class>
6016         <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">
6017                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6018                         <field name="bucket" reporter:datatype="link"/>
6019                         <field name="id" reporter:datatype="id" />
6020                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6021                         <field name="create_time" reporter:datatype="timestamp" />
6022                         <field name="pos" reporter:datatype="int" />
6023                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6024                 </fields>
6025                 <links>
6026                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6027                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6028             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6029                 </links>
6030         </class>
6031         <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">
6032                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6033                         <field name="id" reporter:datatype="id" />
6034                         <field name="item" reporter:datatype="link"/>
6035                         <field name="note" reporter:datatype="text" />
6036                 </fields>
6037                 <links>
6038                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6039                 </links>
6040         </class>
6041         <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">
6042                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6043                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6044                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6045                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6046                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6047                 </fields>
6048                 <links>
6049                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6050                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6051                 </links>
6052         </class>
6053     <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">
6054         <fields oils_persist:primary="field">
6055             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6056             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6057             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6058         </fields>
6059         <links/>
6060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6061             <actions>
6062                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6063                 <retrieve />
6064                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6065                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6066             </actions>
6067         </permacrud>
6068     </class>
6069         <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">
6070                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6071                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6072                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6073                 </fields>
6074                 <links/>
6075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6076             <actions>
6077                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6078                 <retrieve/>
6079                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6080                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6081             </actions>
6082         </permacrud>
6083         </class>
6084
6085
6086         <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">
6087                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6088                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6089                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6090                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6091                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6092                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6093                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6094                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6095                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6096                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6097                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6098                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6099                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6100                 </fields>
6101                 <links>
6102                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6103                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6104                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6105                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6106                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6107                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6108                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6109                 </links>
6110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6111             <actions>
6112                 <create permission="TRANSIT_COPY">
6113                     <context link="target_copy" field="owner"/>
6114                 </create>
6115                 <retrieve/>
6116                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6117                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6118             </actions>
6119         </permacrud>
6120         </class>
6121         <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">
6122                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6123                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6124                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6125                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6126                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6127                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6128                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6129                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6130                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6131                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6132                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6133                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6134                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6135                 </fields>
6136                 <links>
6137                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6138                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6139                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6140                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6141                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6142                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6143                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6144                 </links>
6145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6146             <actions>
6147                 <create permission="TRANSIT_COPY" context_field="owner">
6148                     <context link="target_copy" field="circ_lib"/>
6149                 </create>
6150                 <retrieve/>
6151                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6152                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6153             </actions>
6154         </permacrud>
6155         </class>
6156         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6157                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6158                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6159                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6160                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6161                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6162                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6163                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6164                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6165                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6166                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6167                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6168                 </fields>
6169                 <links>
6170                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6171                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6172                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6173                 </links>
6174         </class>
6175         <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">
6176                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6177                         <field name="grp" />
6178                         <field name="id" reporter:datatype="id" />
6179                         <field name="usr" />
6180                 </fields>
6181                 <links>
6182                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6183                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6184                 </links>
6185         </class>
6186         <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">
6187                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6188                         <field name="id" reporter:datatype="id" />
6189                         <field name="fq_field" reporter:datatype="text"/>
6190                         <field name="identity_value" reporter:datatype="text"/>
6191                         <field name="translation" reporter:datatype="text"/>
6192                         <field name="string" reporter:datatype="text"/>
6193                 </fields>
6194                 <links>
6195                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6196                 </links>
6197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6198             <actions>
6199                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6200                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6201                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6202                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6203             </actions>
6204         </permacrud>
6205         </class>
6206         <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">
6207                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6208                         <field name="id" reporter:datatype="id" />
6209                         <field name="fm_class" reporter:datatype="text"/>
6210                         <field name="field" reporter:datatype="text"/>
6211                         <field name="owner" reporter:datatype="org_unit"/>
6212                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6213                 </fields>
6214                 <links>
6215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6216                 </links>
6217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6218             <actions>
6219                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6220                 <retrieve/>
6221                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6222                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6223             </actions>
6224         </permacrud>
6225         </class>
6226         <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">
6227                 <fields oils_persist:primary="code">
6228                         <field name="code" reporter:datatype="id" />
6229                         <field name="marc_code" reporter:datatype="text"/>
6230                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6231                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6232                 </fields>
6233                 <links/>
6234         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6235             <actions>
6236                 <create permission="CREATE_LOCALE" global_required="true"/>
6237                 <retrieve/>
6238                 <update permission="UPDATE_LOCALE" global_required="true"/>
6239                 <delete permission="DELETE_LOCALE" global_required="true"/>
6240             </actions>
6241         </permacrud>
6242         </class>
6243         <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">
6244                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6245                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6246                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6247                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6248             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6249                 </fields>
6250                 <links>
6251                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6252                 </links>
6253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6254             <actions>
6255                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6256                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6257                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6258                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6259             </actions>
6260         </permacrud>
6261         </class>
6262
6263         <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">
6264                 <fields oils_persist:primary="id">
6265                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6266                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6267                 </fields>
6268                 <links/>
6269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6270             <actions>
6271                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6272                 <retrieve/>
6273                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6274                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6275             </actions>
6276         </permacrud>
6277         </class>
6278
6279         <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">
6280                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6281                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6282                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6283                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6284                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6285                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6286                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6287                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6288                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6289                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6290                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6291                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6292                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6293                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6294                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6295                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6296                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6297                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6298                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6299                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6300                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6301                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6302                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6303                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6304                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6305                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6306                 </fields>
6307                 <links>
6308                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6309                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6310                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6311                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6312                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6313                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6314                 </links>
6315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6316             <actions>
6317                 <create permission="user_request.create">
6318                     <context link="usr" field="home_ou"/>
6319                                 </create>
6320                 <retrieve permission="user_request.view">
6321                     <context link="usr" field="home_ou"/>
6322                                 </retrieve>
6323                 <update permission="user_request.update">
6324                     <context link="usr" field="home_ou"/>
6325                                 </update>
6326                 <delete permission="user_request.delete">
6327                     <context link="usr" field="home_ou"/>
6328                                 </delete>
6329             </actions>
6330         </permacrud>
6331         </class>
6332
6333         <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">
6334                 <fields oils_persist:primary="code">
6335                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6336                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6337                 </fields>
6338                 <links/>
6339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6340             <actions>
6341                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6342                 <retrieve/>
6343                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6344                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6345             </actions>
6346         </permacrud>
6347         </class>
6348
6349         <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">
6350                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6351                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6352                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6353                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6354                         <field reporter:label="Ratio" name="ratio" />
6355                 </fields>
6356                 <links>
6357                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6358                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6359                 </links>
6360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6361                         <actions>
6362                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6363                                 <retrieve/>
6364                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6365                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6366                         </actions>
6367                 </permacrud>
6368         </class>
6369
6370         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6371                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6372                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6373                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6374                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6375                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6376                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6377                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6378                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6379                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6380                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6381                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6382                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6383                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6384                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6385                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6386                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6387                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6388                 </fields>
6389                 <links>
6390                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6391                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6392             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6393             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6394             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6395                 </links>
6396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6397             <actions>
6398                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6399                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6400                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6401                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6402             </actions>
6403         </permacrud>
6404         </class>
6405
6406         <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">
6407                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6408                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6409                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6410                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6411                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6412                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6413                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6414                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6415                 </fields>
6416                 <links>
6417                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6418                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6419                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6420                 </links>
6421         </class>
6422
6423         <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">
6424                 <fields oils_persist:primary="code">
6425                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6426                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6427                 </fields>
6428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6429             <actions>
6430                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6431                 <retrieve/>
6432                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6433                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6434             </actions>
6435                 </permacrud>
6436         </class>
6437
6438         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6439                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6440                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6441                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6442                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6443                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6444                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6445                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6446                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6447                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6448                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6449                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6450                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6451                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6452                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6453                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6454                 </fields>
6455                 <links>
6456                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6457                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6458                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6459                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6460                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6461                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6462                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6463                 </links>
6464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6465             <actions>
6466                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6467                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6468                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6469                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6470             </actions>
6471         </permacrud>
6472         </class>
6473
6474         <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">
6475                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6476                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6477                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6478                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6479                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6480                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6481                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6482                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6483                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6484                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6485                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6486                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6487                 </fields>
6488                 <links>
6489                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6490                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6491                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6492                 </links>
6493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6494             <actions>
6495                 <create   permission="ADMIN_INVOICE">
6496                                         <context link="invoice" field="receiver"/>
6497                                 </create>
6498                 <retrieve permission="ADMIN_INVOICE">
6499                                         <context link="invoice" field="receiver"/>
6500                                 </retrieve>
6501                 <update   permission="ADMIN_INVOICE">
6502                                         <context link="invoice" field="receiver"/>
6503                                 </update>
6504                                 <delete   permission="ADMIN_INVOICE">
6505                                         <context link="invoice" field="receiver"/>
6506                                 </delete>
6507             </actions>
6508         </permacrud>
6509         </class>
6510
6511         <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">
6512                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6513                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6514                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6515                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6516                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6517                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6518                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6519                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6520                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6521                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6522                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6523                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6524                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6525                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6526                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6527                 </fields>
6528                 <links>
6529                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6530                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6531                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6532                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6533                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6534                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6535                 </links>
6536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6537             <actions>
6538                 <create   permission="ADMIN_INVOICE">
6539                                         <context link="invoice" field="receiver"/>
6540                                 </create>
6541                 <retrieve permission="ADMIN_INVOICE">
6542                                         <context link="invoice" field="receiver"/>
6543                                 </retrieve>
6544                 <update   permission="ADMIN_INVOICE">
6545                                         <context link="invoice" field="receiver"/>
6546                                 </update>
6547                                 <delete   permission="ADMIN_INVOICE">
6548                                         <context link="invoice" field="receiver"/>
6549                                 </delete>
6550             </actions>
6551         </permacrud>
6552         </class>
6553
6554         <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">
6555                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6556                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6557                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6558                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6559                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6560                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6561                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6562                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6563                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6564                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6565                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6566                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6567                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6568                 </fields>
6569                 <links>
6570                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6571                 </links>
6572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6573             <actions>
6574                 <create permission="ADMIN_PROVIDER">
6575                     <context link="provider" field="owner"/>
6576                 </create>
6577                 <retrieve permission="ADMIN_PROVIDER">
6578                     <context link="provider" field="owner"/>
6579                 </retrieve>
6580                 <update permission="ADMIN_PROVIDER">
6581                     <context link="provider" field="owner"/>
6582                 </update>
6583                 <delete permission="ADMIN_PROVIDER">
6584                     <context link="provider" field="owner"/>
6585                 </delete>
6586             </actions>
6587         </permacrud>
6588         </class>
6589
6590         <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">
6591                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6592                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6593                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6594                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6595                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6596                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6597                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6598         </fields>
6599                 <links>
6600                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6601                 </links>
6602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6603             <actions>
6604                 <create permission="ADMIN_PROVIDER">
6605                     <context link="provider" field="owner"/>
6606                 </create>
6607                 <retrieve permission="ADMIN_PROVIDER">
6608                     <context link="provider" field="owner"/>
6609                 </retrieve>
6610                 <update permission="ADMIN_PROVIDER">
6611                     <context link="provider" field="owner"/>
6612                 </update>
6613                 <delete permission="ADMIN_PROVIDER">
6614                     <context link="provider" field="owner"/>
6615                 </delete>
6616             </actions>
6617         </permacrud>
6618     </class>
6619         <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">
6620                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6621                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6622                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6623                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6624                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6625                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6626                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6627                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6628                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6629                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6630                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6631                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6632                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6633                 </fields>
6634                 <links>
6635                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6636                 </links>
6637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6638             <actions>
6639                 <create permission="ADMIN_PROVIDER">
6640                     <context link="contact" jump='provider' field="owner"/>
6641                 </create>
6642                 <retrieve permission="ADMIN_PROVIDER">
6643                     <context link="contact" jump='provider' field="owner"/>
6644                 </retrieve>
6645                 <update permission="ADMIN_PROVIDER">
6646                     <context link="contact" jump='provider' field="owner"/>
6647                 </update>
6648                 <delete permission="ADMIN_PROVIDER">
6649                     <context link="contact" jump='provider' field="owner"/>
6650                 </delete>
6651             </actions>
6652         </permacrud>
6653         </class>
6654
6655         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6656                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6657                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6658                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6659                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6660                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6661                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6662                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6663                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6664                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6665                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6666                 </fields>
6667                 <links>
6668                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6669                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6670                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6671                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6672                 </links>
6673         </class>
6674
6675         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6677                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6678                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6679                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6680                 </fields>
6681                 <links>
6682             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6683                 </links>
6684                 <!--
6685                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6686                         But here's what it should look like if we ever do use pcrud.
6687                 -->
6688                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6689                         <actions>
6690                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6691                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6692                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6693                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6694                         </actions>
6695                 </permacrud>
6696         </class>
6697
6698         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6699                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6700                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6701                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6702                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6703                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6704                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6705                 </fields>
6706                 <links>
6707                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6708                 </links>
6709                 <!--
6710                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6711                         But here's what it should look like if we ever do use pcrud.
6712                 -->
6713                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6714                         <actions>
6715                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6716                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6717                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6718                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6719                         </actions>
6720                 </permacrud>
6721         </class>
6722
6723         <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">
6724                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6725                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6726                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6727                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6728                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6729                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6730                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6731                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6732                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6733                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6734                 </fields>
6735                 <links>
6736                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6737                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6738             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6739             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6740                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6741                 </links>
6742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6743             <actions>
6744                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6745                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6746                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6747                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6748             </actions>
6749         </permacrud>
6750         </class>
6751
6752         <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">
6753                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6754                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6755                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6756                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6757                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6758                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6759                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6760                 </fields>
6761                 <links>
6762                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6763                 </links>
6764                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6765                         <actions>
6766                                 <create permission="ADMIN_FUNDING_SOURCE">
6767                     <context link="funding_source" field="owner"/>
6768                 </create>
6769                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6770                     <context link="funding_source" field="owner"/>
6771                 </retrieve>
6772                                 <update permission="ADMIN_FUNDING_SOURCE">
6773                     <context link="funding_source" field="owner"/>
6774                 </update>
6775                                 <delete permission="ADMIN_FUNDING_SOURCE">
6776                     <context link="funding_source" field="owner"/>
6777                 </delete>
6778                         </actions>
6779                 </permacrud>
6780         </class>
6781
6782         <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">
6783                 <fields oils_persist:primary="id">
6784                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6785                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6786                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6787                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6788                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6789                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6790                 </fields>
6791                 <links>
6792                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6793                 </links>
6794         </class>
6795
6796         <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">
6797                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6798                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6799                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6800                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6801                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6802                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6803                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6804                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6805                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6806                 </fields>
6807                 <links>
6808                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6809                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6810                 </links>
6811                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6812                         <actions>
6813                                 <create permission="ADMIN_ACQ_FUND">
6814                     <context link="fund" field="org"/>
6815                 </create>
6816                                 <retrieve permission="ADMIN_ACQ_FUND">
6817                     <context link="fund" field="org"/>
6818                 </retrieve>
6819                                 <update permission="ADMIN_ACQ_FUND">
6820                     <context link="fund" field="org"/>
6821                 </update>
6822                                 <delete permission="ADMIN_ACQ_FUND">
6823                     <context link="fund" field="org"/>
6824                 </delete>
6825                         </actions>
6826                 </permacrud>
6827         </class>
6828
6829         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6830                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6831                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6832                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6833                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6834                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6835                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6836                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6837                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6838                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6839                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6840                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6841                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6842                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6843                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6844                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6845                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6846                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
6847                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
6848                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
6849                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
6850                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
6851                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
6852                 </fields>
6853                 <links>
6854                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6855                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6856             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6857             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6858             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6859             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
6860             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
6861             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
6862             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
6863             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
6864             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
6865                 </links>
6866         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6867             <actions>
6868                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6869                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6870                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6871                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6872             </actions>
6873         </permacrud>
6874         </class>
6875
6876         <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">
6877                 <fields oils_persist:primary="fund">
6878                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6879                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6880                 </fields>
6881                 <links>
6882                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6883                 </links>
6884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6885             <actions>
6886                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6887                                         <context link="fund" field="org" />
6888                 </retrieve>
6889             </actions>
6890         </permacrud>
6891         </class>
6892
6893         <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">
6894                 <fields oils_persist:primary="fund">
6895                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6896                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6897                 </fields>
6898                 <links>
6899                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6900                 </links>
6901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6902             <actions>
6903                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6904                                         <context link="fund" field="org" />
6905                 </retrieve>
6906             </actions>
6907         </permacrud>
6908         </class>
6909
6910         <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">
6911                 <fields oils_persist:primary="fund">
6912                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6913                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6914                 </fields>
6915                 <links>
6916                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6917                 </links>
6918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6919             <actions>
6920                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6921                                         <context link="fund" field="org" />
6922                 </retrieve>
6923             </actions>
6924         </permacrud>
6925         </class>
6926
6927         <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">
6928                 <fields oils_persist:primary="fund">
6929                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6930                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6931                 </fields>
6932                 <links>
6933                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6934                 </links>
6935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6936             <actions>
6937                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6938                                         <context link="fund" field="org" />
6939                 </retrieve>
6940             </actions>
6941         </permacrud>
6942         </class>
6943
6944         <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">
6945                 <fields oils_persist:primary="fund">
6946                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6947                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6948                 </fields>
6949                 <links>
6950                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6951                 </links>
6952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6953             <actions>
6954                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6955                                         <context link="fund" field="org" />
6956                 </retrieve>
6957             </actions>
6958         </permacrud>
6959         </class>
6960
6961    <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">
6962         <fields oils_persist:primary="fund">
6963             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6964             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6965         </fields>
6966         <links>
6967             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6968         </links>
6969     </class>
6970
6971    <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">
6972         <fields oils_persist:primary="fund">
6973             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6974             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6975         </fields>
6976         <links>
6977             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6978         </links>
6979     </class>
6980
6981    <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">
6982         <fields oils_persist:primary="fund">
6983             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6984             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6985         </fields>
6986         <links>
6987             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6988         </links>
6989     </class>
6990
6991    <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">
6992         <fields oils_persist:primary="fund">
6993             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6994             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6995         </fields>
6996         <links>
6997             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6998         </links>
6999     </class>
7000
7001    <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">
7002         <fields oils_persist:primary="fund">
7003             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7004             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7005         </fields>
7006         <links>
7007             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7008         </links>
7009     </class>
7010
7011         <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">
7012                 <fields oils_persist:primary="funding_source">
7013                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7014                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7015                 </fields>
7016                 <links>
7017                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7018                 </links>
7019         </class>
7020
7021         <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">
7022                 <fields oils_persist:primary="funding_source">
7023                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7024                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7025                 </fields>
7026                 <links>
7027                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7028                 </links>
7029         </class>
7030
7031         <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">
7032                 <fields oils_persist:primary="funding_source">
7033                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7034                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7035                 </fields>
7036                 <links>
7037                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7038                 </links>
7039         </class>
7040
7041         <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">
7042                 <fields oils_persist:primary="fund">
7043                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7044                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7045                 </fields>
7046                 <links>
7047                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7048                 </links>
7049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7050             <actions>
7051                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7052                                         <context link="fund" field="org" />
7053                 </retrieve>
7054             </actions>
7055         </permacrud>
7056     </class>
7057
7058         <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">
7059                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7060                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7061                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7062                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7063                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7064                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7065                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7066                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7067                 </fields>
7068                 <links>
7069                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7070                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7071                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7072                 </links>
7073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7074                         <actions>
7075                                 <create permission="ADMIN_ACQ_FUND">
7076                     <context link="fund" field="org"/>
7077                 </create>
7078                                 <retrieve permission="ADMIN_ACQ_FUND">
7079                     <context link="fund" field="org"/>
7080                 </retrieve>
7081                                 <update permission="ADMIN_ACQ_FUND">
7082                     <context link="fund" field="org"/>
7083                 </update>
7084                                 <delete permission="ADMIN_ACQ_FUND">
7085                     <context link="fund" field="org"/>
7086                 </delete>
7087                         </actions>
7088                 </permacrud>
7089         </class>
7090
7091     <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">
7092         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7093             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7094             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7095             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7096             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7097             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7098             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7099             <field reporter:label="Note" name="note" reporter:datatype="text" />
7100             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7101         </fields>
7102         <links>
7103             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7104             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7105             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7106         </links>
7107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7108                         <actions>
7109                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7110                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7111                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7112                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7113                         </actions>
7114                 </permacrud>
7115     </class>
7116
7117         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7118                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7119                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7120                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7121                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7122                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7123                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7124                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7125                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7126                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7127                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7128                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7129                 </fields>
7130                 <links>
7131                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7132                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7133                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7134                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7135                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7136                 </links>
7137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7138                         <actions>
7139                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7140                         </actions>
7141                 </permacrud>
7142         </class>
7143
7144         <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">
7145                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7146                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7147                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7148                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7149                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7150                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7151                 </fields>
7152                 <links>
7153                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7154                 </links>
7155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7156                         <actions>
7157                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7158                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7159                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7160                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7161                         </actions>
7162                 </permacrud>
7163         </class>
7164
7165         <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">
7166                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7167                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7168                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7169                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7170                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7171                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7172                         <field reporter:label="State" name="state" reporter:datatype="text" />
7173                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7174                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7175                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7176                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7177                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7178                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7179                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7180                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7181                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7182                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7183                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7184                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7185                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7186                 </fields>
7187                 <links>
7188                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7189                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7190                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7191                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7192                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7193                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7194                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7195                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7196                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7197                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7198                 </links>
7199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7200                         <actions>
7201                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7202                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7203                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7204                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7205                         </actions>
7206                 </permacrud>
7207         </class>
7208
7209         <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">
7210                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7211                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7212                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7213                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7214                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7215                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7216                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7217                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7218                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7219                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7220                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7221                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7222                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7223                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7224                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7225                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7226                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7227                 </fields>
7228                 <links>
7229                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7230                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7231                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7232                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7233                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7234                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7235                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7236                 </links>
7237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7238             <actions>
7239                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7240             </actions>
7241                 </permacrud>
7242         </class>
7243
7244         <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">
7245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7246                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7247                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7248                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7249                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7250                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7251                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7252                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7253                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7254                 </fields>
7255                 <links>
7256                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7257                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7258                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7259                 </links>
7260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7261             <actions>
7262                 <create permission="CREATE_PURCHASE_ORDER">
7263                     <context link="purchase_order" field="ordering_agency"/>
7264                 </create>
7265                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7266                     <context link="purchase_order" field="ordering_agency"/>
7267                 </retrieve>
7268                 <update permission="CREATE_PURCHASE_ORDER">
7269                     <context link="purchase_order" field="ordering_agency"/>
7270                 </update>
7271                 <delete permission="CREATE_PURCHASE_ORDER">
7272                     <context link="purchase_order" field="ordering_agency"/>
7273                 </delete>
7274             </actions>
7275                 </permacrud>
7276         </class>
7277
7278         <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">
7279                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7280                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7281                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7282                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7283                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7284                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7285                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7286                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7287                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7288                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7289                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7290                 </fields>
7291                 <links>
7292                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7293                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7294                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7295                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7296                 </links>
7297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7298             <actions>
7299                 <create permission="CREATE_PURCHASE_ORDER">
7300                     <context link="purchase_order" field="ordering_agency"/>
7301                 </create>
7302                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7303                     <context link="purchase_order" field="ordering_agency"/>
7304                 </retrieve>
7305                 <update permission="CREATE_PURCHASE_ORDER">
7306                     <context link="purchase_order" field="ordering_agency"/>
7307                 </update>
7308                 <delete permission="CREATE_PURCHASE_ORDER">
7309                     <context link="purchase_order" field="ordering_agency"/>
7310                 </delete>
7311             </actions>
7312                 </permacrud>
7313         </class>
7314
7315         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7316                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7317                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7318                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7319                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7320                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7321                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7322                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7323                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7324                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7325                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7326                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7327                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7328                         <field reporter:label="State" name="state" reporter:datatype="text" />
7329                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7330                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7331                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7332                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7333                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7334                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7335                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7336                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7337                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7338                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7339                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7340                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7341                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7342                 </fields>
7343                 <links>
7344                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7345                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7346                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7347                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7348                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7349                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7350                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7351                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7352                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7353                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7354                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7355                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7356                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7357                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7358                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7359                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7360                 </links>
7361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7362                         <actions>
7363                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7364                                         <context link="purchase_order" field="ordering_agency"/>
7365                                         <context link="picklist" field="org_unit"/>
7366                                 </retrieve>
7367                         </actions>
7368                 </permacrud>
7369         </class>
7370
7371         <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">
7372                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7373                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7374                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7375                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7376                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7377                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7378                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7379                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7380                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7381                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7382                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7383                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7384                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7385                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7386                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7387                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7388                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7389                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7390                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7391                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7392                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7393                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7394                 </fields>
7395                 <links>
7396                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7397                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7398                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7399                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7400                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7401                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7402                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7403                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7404                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7405                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7406                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7407                 </links>
7408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7409                         <actions>
7410                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7411                                         <context link="purchase_order" field="ordering_agency"/>
7412                                         <context link="picklist" field="org_unit"/>
7413                                 </retrieve>
7414                         </actions>
7415                 </permacrud>
7416         </class>
7417
7418         <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">
7419                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7420                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7421                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7422                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7424                 </fields>
7425                 <links>
7426                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7427                 </links>
7428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7429                         <actions>
7430                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7431                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7432                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7433                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7434                         </actions>
7435                 </permacrud>
7436         </class>
7437
7438         <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">
7439                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7440                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7441                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7442                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7443                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7444                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7445                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7446                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7447                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7448                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7449                 </fields>
7450                 <links>
7451                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7452                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7453                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7454                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7455                 </links>
7456         </class>
7457
7458         <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">
7459                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7460                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7461                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7462                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7463                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7464                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7465                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7466                 </fields>
7467                 <links>
7468                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7469                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7470                 </links>
7471         </class>
7472
7473         <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">
7474                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7475                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7476                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7477                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7478                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7479                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7480                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7481                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7482                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7483                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7484                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7485                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7486                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7487                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7488                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7489                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7490                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7491                 </fields>
7492                 <links>
7493                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7494                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7495                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7496                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7497                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7498                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7499                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7500                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7501                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7502                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7503                 </links>
7504         </class>
7505
7506         <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">
7507                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7508                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7509                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7510                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7511                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7512                 </fields>
7513                 <links/>
7514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7515                         <actions>
7516                                 <retrieve />
7517                         </actions>
7518                 </permacrud>
7519         </class>
7520
7521         <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">
7522                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7523                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7524                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7525                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7526                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7527                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7528             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7529                 </fields>
7530                 <links/>
7531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7532             <actions>
7533                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7534                 <retrieve />
7535                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7536                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7537             </actions>
7538         </permacrud>
7539         </class>
7540
7541         <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">
7542                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7543                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7544                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7545                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7546                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7547                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7548                 </fields>
7549                 <links/>
7550         </class>
7551         <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">
7552                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7553                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7554                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7555                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7556                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7557                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7558                 </fields>
7559                 <links>
7560                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7561                 </links>
7562         </class>
7563
7564         <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">
7565             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7566                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7567                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7568                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7569                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7570                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7571                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7572         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7573
7574             </fields>
7575             <links>
7576                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7577             </links>
7578             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7579                 <actions>
7580                     <create permission="ADMIN_PROVIDER">
7581                         <context link="provider" field="owner"/>
7582                     </create>
7583                     <retrieve permission="ADMIN_PROVIDER">
7584                         <context link="provider" field="owner"/>
7585                     </retrieve>
7586                     <update permission="ADMIN_PROVIDER">
7587                         <context link="provider" field="owner"/>
7588                     </update>
7589                     <delete permission="ADMIN_PROVIDER">
7590                         <context link="provider" field="owner"/>
7591                     </delete>
7592                 </actions>
7593             </permacrud>
7594         </class>
7595         
7596         <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">
7597             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7598                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7599                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7600                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7601                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7602             </fields>
7603             <links>
7604                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7605             </links>
7606             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7607                 <actions>
7608                     <create permission="ADMIN_PROVIDER">
7609                         <context link="provider" field="owner"/>
7610                     </create>
7611                     <retrieve permission="ADMIN_PROVIDER">
7612                         <context link="provider" field="owner"/>
7613                     </retrieve>
7614                     <update permission="ADMIN_PROVIDER">
7615                         <context link="provider" field="owner"/>
7616                     </update>
7617                     <delete permission="ADMIN_PROVIDER">
7618                         <context link="provider" field="owner"/>
7619                     </delete>
7620                 </actions>
7621             </permacrud>
7622         </class>
7623         
7624         <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">
7625             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7626                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7627                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7628                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7629                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7630                 </fields>
7631                 <links/>
7632         </class>
7633
7634         <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">
7635                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7636                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7637                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7638                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7639                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7640                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7641                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7642                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7643                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7644                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7645                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7646                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7647                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7648                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7649                 </fields>
7650                 <links>
7651                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7652                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7653                 </links>
7654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7655             <actions>
7656                 <create permission="ADMIN_PROVIDER">
7657                     <context link="provider" field="owner"/>
7658                 </create>
7659                 <retrieve permission="ADMIN_PROVIDER">
7660                     <context link="provider" field="owner"/>
7661                 </retrieve>
7662                 <update permission="ADMIN_PROVIDER">
7663                     <context link="provider" field="owner"/>
7664                 </update>
7665                 <delete permission="ADMIN_PROVIDER">
7666                     <context link="provider" field="owner"/>
7667                 </delete>
7668             </actions>
7669         </permacrud>
7670         </class>
7671
7672         <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">
7673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7674                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7675                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7676                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7677                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7678                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7679                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7680                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7681                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7682                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7683                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7684                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7685                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7686                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7687                 </fields>
7688                 <links>
7689                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7690                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7691                 </links>
7692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7693             <actions>
7694                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7695                     <context link="account" jump="provider" field="owner"/>
7696                 </retrieve>
7697                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7698                     <context link="account" jump="provider" field="owner"/>
7699                 </update>
7700                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7701                     <context link="account" jump="provider" field="owner"/>
7702                 </delete>
7703             </actions>
7704         </permacrud>
7705         </class>
7706
7707
7708         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7709                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7710                         <field name="id" reporter:datatype="id" />
7711                         <field name="parent" reporter:datatype="link"/>
7712                         <field name="owner" reporter:datatype="link"/>
7713                         <field name="create_time" reporter:datatype="timestamp"/>
7714                         <field name="name" reporter:datatype="text"/>
7715                         <field name="shared" reporter:datatype="bool"/>
7716                         <field name="share_with" reporter:datatype="link"/>
7717                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7718                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7719                 </fields>
7720                 <links>
7721                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7722                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7723                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7724                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7725                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7726                 </links>
7727         </class>
7728         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7729                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7730                         <field name="id" reporter:datatype="id" />
7731                         <field name="parent" reporter:datatype="link"/>
7732                         <field name="owner" reporter:datatype="link"/>
7733                         <field name="create_time" reporter:datatype="timestamp"/>
7734                         <field name="name" reporter:datatype="text"/>
7735                         <field name="shared" reporter:datatype="bool"/>
7736                         <field name="share_with" reporter:datatype="link"/>
7737                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7738                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7739                 </fields>
7740                 <links>
7741                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7742                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7743                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7744                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7745                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7746                 </links>
7747         </class>
7748         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7749                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7750                         <field name="id" reporter:datatype="id" />
7751                         <field name="parent" reporter:datatype="link"/>
7752                         <field name="owner" reporter:datatype="link"/>
7753                         <field name="create_time" reporter:datatype="timestamp"/>
7754                         <field name="name" reporter:datatype="text"/>
7755                         <field name="shared" reporter:datatype="bool"/>
7756                         <field name="share_with" reporter:datatype="link"/>
7757                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7758                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7759                 </fields>
7760                 <links>
7761                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7762                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7763                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7764                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7765                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7766                 </links>
7767         </class>
7768         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7769                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7770                         <field name="id" reporter:datatype="id" />
7771                         <field name="owner" reporter:datatype="link"/>
7772                         <field name="create_time" reporter:datatype="timestamp"/>
7773                         <field name="name" reporter:datatype="text"/>
7774                         <field name="data" reporter:datatype="text"/>
7775                         <field name="folder" reporter:datatype="link"/>
7776                         <field name="description" reporter:datatype="text"/>
7777                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7778                 </fields>
7779                 <links>
7780                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7781                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7782                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7783                 </links>
7784         </class>
7785         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7786                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7787                         <field name="id" reporter:datatype="id" />
7788                         <field name="owner" reporter:datatype="link"/>
7789                         <field name="create_time" reporter:datatype="timestamp"/>
7790                         <field name="template" reporter:datatype="link"/>
7791                         <field name="data" reporter:datatype="text"/>
7792                         <field name="folder" reporter:datatype="link"/>
7793                         <field name="recur" reporter:datatype="bool"/>
7794                         <field name="recurrence" reporter:datatype="interval"/>
7795                         <field name="name" reporter:datatype="text"/>
7796                         <field name="description" reporter:datatype="text"/>
7797                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7798                 </fields>
7799                 <links>
7800                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7801                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7802                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7803                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7804                 </links>
7805         </class>
7806         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7807                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7808                         <field name="id" reporter:datatype="id" />
7809                         <field name="runner" reporter:datatype="link"/>
7810                         <field name="start_time" reporter:datatype="timestamp"/>
7811                         <field name="complete_time" reporter:datatype="timestamp"/>
7812                         <field name="run_time" reporter:datatype="timestamp"/>
7813                         <field name="email" reporter:datatype="text"/>
7814                         <field name="excel_format" reporter:datatype="bool"/>
7815                         <field name="csv_format" reporter:datatype="bool"/>
7816                         <field name="html_format" reporter:datatype="bool"/>
7817                         <field name="error_code" reporter:datatype="int"/>
7818                         <field name="error_text" reporter:datatype="text"/>
7819                         <field name="report" reporter:datatype="link"/>
7820                         <field name="folder" reporter:datatype="link"/>
7821                         <field name="chart_pie" reporter:datatype="bool"/>
7822                         <field name="chart_bar" reporter:datatype="bool"/>
7823                         <field name="chart_line" reporter:datatype="bool"/>
7824                 </fields>
7825                 <links>
7826                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7827                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7828                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7829                 </links>
7830         </class>
7831         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
7832                 <fields oils_persist:primary="id">
7833                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7834                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7835                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7836                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7837                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7838                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7839                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7840                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7841                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7842                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7843                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7844                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7845                 </fields>
7846                 <links>
7847                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7848                 </links>
7849         </class>
7850         <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">
7851                 <fields oils_persist:primary="id">
7852                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7853                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7854                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7855                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7856                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7857                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7858                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7859                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7860                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7861                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7862                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7863                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7864                 </fields>
7865                 <links>
7866                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7867                 </links>
7868         </class>
7869         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7870                 <fields oils_persist:primary="id">
7871                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7872                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7873                         <field reporter:label="Fingerprint" name="fingerprint" />
7874                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7875                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7876                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7877                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7878                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7879                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7880                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7881                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7882                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7883                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7884                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7885                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7886                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7887                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7888                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7889                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7890                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7891                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7892                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7893                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7894                 </fields>
7895                 <links>
7896                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7897                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7898                 </links>
7899         </class>
7900         <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">
7901                 <fields oils_persist:primary="id">
7902                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7903                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7904                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7905                 </fields>
7906                 <links>
7907                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7908                 </links>
7909         </class>
7910         <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">
7911                 <fields oils_persist:primary="id">
7912                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7913                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7914                 </fields>
7915                 <links>
7916                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7917                 </links>
7918         </class>
7919         <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">
7920                 <fields oils_persist:primary="id">
7921                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7922                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7923                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7924                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7925                 </fields>
7926                 <links>
7927                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7928                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7929                 </links>
7930         </class>
7931         <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">
7932                 <fields oils_persist:primary="xact">
7933                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7934                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7935                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7936                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7937                 </fields>
7938                 <links>
7939                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7940                 </links>
7941         </class>
7942         <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">
7943                 <fields oils_persist:primary="xact">
7944                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7945                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7946                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7947                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7948                 </fields>
7949                 <links>
7950                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7951                 </links>
7952         </class>
7953         <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)">
7954                 <fields oils_persist:primary="id">
7955                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7956                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7957                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7958                 </fields>
7959                 <links>
7960                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7961                 </links>
7962         </class>
7963         <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">
7964                 <fields oils_persist:primary="id">
7965                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7966                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7967                 </fields>
7968                 <links>
7969                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7970                 </links>
7971         </class>
7972         <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">
7973                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7974                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7975                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7976                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7977                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7978                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7979                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7980                 </fields>
7981                 <links>
7982                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7983                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7984                 </links>
7985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7986                         <actions>
7987                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7988                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7989                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7990                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7991                         </actions>
7992                 </permacrud>
7993         </class>
7994         <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">
7995                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7996                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7997                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7998                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7999                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8000                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8001                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8002                 </fields>
8003                 <links>
8004                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8005                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8006                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8007                 </links>
8008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8009                         <actions>
8010                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8011                                         <context link="formula" field="owner"/>
8012                                 </create>
8013                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8014                                         <context link="formula" field="owner"/>
8015                                 </retrieve>
8016                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8017                                         <context link="formula" field="owner"/>
8018                                 </update>
8019                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8020                                         <context link="formula" field="owner"/>
8021                                 </delete>
8022                         </actions>
8023                 </permacrud>
8024         </class>
8025
8026         <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">
8027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8028                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8029                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8030                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8031                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8032                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8033                 </fields>
8034                 <links>
8035                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8036                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8037                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8038                 </links>
8039                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8040                         <actions>
8041                                 <create permission="CREATE_PURCHASE_ORDER">
8042                                         <context link="formula" field="owner"/>
8043                 </create>
8044                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8045                                         <context link="formula" field="owner"/>
8046                 </retrieve>
8047                                 <update permission="CREATE_PURCHASE_ORDER">
8048                                         <context link="formula" field="owner"/>
8049                 </update>
8050                                 <delete permission="CREATE_PURCHASE_ORDER">
8051                                         <context link="formula" field="owner"/>
8052                 </delete>
8053                         </actions>
8054                 </permacrud>
8055         </class>
8056
8057         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8058                 <fields oils_persist:primary="id">
8059                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8060                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8061                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8062                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8063                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8064                 </fields>
8065                 <links>
8066                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8067                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8068                 </links>
8069         </class>
8070
8071         <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">
8072                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8073                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8074                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8075                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8076                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8077                 </fields>
8078                 <links>
8079                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8080                 </links>
8081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8082                         <actions>
8083                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8084                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8085                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8086                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8087                         </actions>
8088                 </permacrud>
8089         </class>
8090
8091         <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">
8092                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8093                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8094                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8095                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8096                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8097                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8098                 </fields>
8099                 <links>
8100                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8101                 </links>
8102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8103                         <actions>
8104                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8105                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8106                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8107                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8108                         </actions>
8109                 </permacrud>
8110         </class>
8111
8112         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8113                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8114                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8115                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8116                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8117                 </fields>
8118                 <links>
8119                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8120                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8121                 </links>
8122         </class>
8123
8124         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8125                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8126                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8127                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8128                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8129                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8130                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8131                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8132                 </fields>
8133                 <links>
8134                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8135                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8136                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8137                 </links>
8138         </class>
8139
8140         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8141                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8142                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8143                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8144                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8145                 </fields>
8146                 <links>
8147                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8148                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8149                 </links>
8150         </class>
8151
8152         <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">
8153                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8154                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8155                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8156                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8157                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8158                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8159                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8160                 </fields>
8161                 <links>
8162                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8163                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8164                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8165                 </links>
8166         </class>
8167
8168         <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">
8169                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8170                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8171                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8172                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8173                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8174                 </fields>
8175                 <links>
8176                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8177                 </links>
8178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8179             <actions>
8180                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8181                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8182                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8183                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8184             </actions>
8185                 </permacrud>
8186         </class>
8187
8188         <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">
8189                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8190                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8191                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8192                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8193                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8194                 </fields>
8195                 <links>
8196                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8197                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8198                 </links>
8199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8200                         <actions>
8201                                 <create permission="ADMIN_CLAIM_POLICY">
8202                                         <context link="claim_policy" field="org_unit"/>
8203                 </create>
8204                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8205                                         <context link="claim_policy" field="org_unit"/>
8206                 </retrieve>
8207                                 <update permission="ADMIN_CLAIM_POLICY">
8208                                         <context link="claim_policy" field="org_unit"/>
8209                 </update>
8210                                 <delete permission="ADMIN_CLAIM_POLICY">
8211                                         <context link="claim_policy" field="org_unit"/>
8212                 </delete>
8213                         </actions>
8214                 </permacrud>
8215         </class>
8216
8217     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8218         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8219             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8220             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8221             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8222             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8223             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8224             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8225             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8226             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8227             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8228             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8229             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8230             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8231             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8232             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8233             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8234         </fields>
8235     </class>
8236
8237     <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">
8238         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8239             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8240             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8241             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8242             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8243             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8244         </fields>
8245     </class>
8246
8247     <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">
8248         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8249             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8250             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8251             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8252             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8253             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8254             <field reporter:label="City" name="city" reporter:datatype="text"/>
8255             <field reporter:label="State" name="state" reporter:datatype="text"/>
8256             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8257             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8258             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8259         </fields>
8260     </class>
8261
8262     <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">
8263         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8264             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8265             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8266             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8267             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8268             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8269             <field reporter:label="City" name="city" reporter:datatype="text"/>
8270             <field reporter:label="State" name="state" reporter:datatype="text"/>
8271             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8272             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8273             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8274         </fields>
8275     </class>
8276
8277     <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">
8278         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8279             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8280             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8281             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8282             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8283             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8284             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8285         </fields>
8286     </class>
8287
8288         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8289                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8290                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8291                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8292                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8293                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8294                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8295                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8296                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8297                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8298                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8299                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8300                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8301                 </fields>
8302                 <links>
8303                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8304                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8305                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8306                 </links>
8307         </class>
8308
8309         <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">
8310                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8311                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8312                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8313                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8314                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8315                 </fields>
8316                 <links>
8317                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8318                 </links>
8319         </class>
8320
8321     <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">
8322         <fields>
8323             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8324             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8325             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8326         </fields>
8327                 <links>
8328                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8329                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8330                 </links>
8331     </class>
8332
8333     <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">
8334         <fields>
8335             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8336             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8337         </fields>
8338                 <links>
8339                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8340                 </links>
8341     </class>
8342
8343     <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">
8344         <fields>
8345             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8346             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8347             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8348         </fields>
8349                 <links>
8350                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8351                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8352                 </links>
8353     </class>
8354
8355     <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">
8356         <fields>
8357             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8358             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8359         </fields>
8360                 <links>
8361                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8362                 </links>
8363     </class>
8364
8365     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8366                 <oils_persist:source_definition>
8367
8368             SELECT  DISTINCT l.*
8369               FROM  action.unfulfilled_hold_loops l
8370                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8371               WHERE l.count = m.max
8372
8373                 </oils_persist:source_definition>
8374         <fields>
8375             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8376             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8377             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8378         </fields>
8379                 <links>
8380                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8381                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8382                 </links>
8383     </class>
8384
8385         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8386                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8387                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8388                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8389                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8390                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8391                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8392                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8393                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8394                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8395                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8396                 </fields>
8397                 <links>
8398                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8399                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8400                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8401                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8402                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8403                 </links>
8404         </class>
8405
8406         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8408                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8409                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8410                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8411                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8412                 </fields>
8413                 <links>
8414                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8415                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8416                 </links>
8417         </class>
8418
8419         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8420                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8421                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8422                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8423                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8424                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8425                 </fields>
8426                 <links>
8427                 </links>
8428         </class>
8429
8430         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8431                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8432                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8433                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8434                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8435                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8436                 </fields>
8437                 <links>
8438                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8439                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8440                 </links>
8441         </class>
8442         
8443         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8444                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8445                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8446                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8447                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8448                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8449                 </fields>
8450                 <links>
8451                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8452                 </links>
8453         </class>
8454         
8455         <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">
8456                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8457                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8458                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8459                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8460                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8461                 </fields>
8462                 <links>
8463                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8464                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8465                 </links>
8466         </class>
8467
8468         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8469                 <fields oils_persist:primary="name">
8470                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8471                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8472                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8473                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8474                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8475                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8476                 </fields>
8477                 <links>
8478                 </links>
8479         </class>
8480
8481         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8482                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8483                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8484                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8485                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8486                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8487                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8488                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8489                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8490                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8491                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8492                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8493                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8494                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8495                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8496                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8497                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8498                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8499                 </fields>
8500                 <links>
8501                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8502                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8503                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8504                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8505                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8506                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8507                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8508                 </links>
8509         </class>
8510
8511         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8512                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8513                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8514                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8515                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8516                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8517                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8518                 </fields>
8519                 <links>
8520                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8521                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8522                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8523                 </links>
8524         </class>
8525
8526         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8527                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8528                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8529                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8530                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8531                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8532                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8533                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8534                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8535                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8536                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8537                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8538                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8539                 </fields>
8540                 <links>
8541                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8542                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8543                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8544                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8545                 </links>
8546         </class>
8547
8548         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8549                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8550                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8551                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8552                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8553                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8554                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8555                 </fields>
8556                 <links>
8557                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8558                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8559                 </links>
8560         </class>
8561
8562         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8563                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8564                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8565                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8566                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8567                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8568                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8569                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8570                 </fields>
8571                 <links>
8572                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8573                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8574                 </links>
8575         </class>
8576
8577         <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">
8578                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8579                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8580                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8581                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8582                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8583                 </fields>
8584                 <links>
8585                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8586                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8587                 </links>
8588         </class>
8589
8590         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8591                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8592                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8593                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8594                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8595                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8596                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8597                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8598                 </fields>
8599                 <links>
8600                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8601                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8602                 </links>
8603         </class>
8604
8605         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8606                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8607                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8608                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8609                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8610                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8611                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8612                 </fields>
8613                 <links>
8614                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8615                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8616                 </links>
8617         </class>
8618
8619         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8620                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8621                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8622                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8623                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8624                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8625                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8626                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8627                 </fields>
8628                 <links>
8629                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8630                 </links>
8631         </class>
8632
8633         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8634                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8635                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8636                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8637                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8638                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8639                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8640                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8641                 </fields>
8642                 <links>
8643                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8644                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8645                 </links>
8646         </class>
8647
8648         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8649                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8650                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8651                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8652                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8653                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8654                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8655                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8656                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8657                 </fields>
8658                 <links>
8659                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8660                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8661                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8662                 </links>
8663         </class>
8664
8665         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8666                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8667                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8668                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8669                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8670                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8671                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8672                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8673                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8674                 </fields>
8675                 <links>
8676                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8677                 </links>
8678         </class>
8679
8680         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8681                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8682                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8683                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8684                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8685                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8686                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8687                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8688                 </fields>
8689                 <links>
8690                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8691                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8692                 </links>
8693         </class>
8694
8695         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8696                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8697                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8698                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8699                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8700                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8701                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8702                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8703                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8704                 </fields>
8705                 <links>
8706                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8707                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8708                 </links>
8709         </class>
8710
8711         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8712                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8713                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8714                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8715                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8716                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8717                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8718                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8719                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8720                 </fields>
8721                 <links>
8722                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8723                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8724                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8725                 </links>
8726         </class>
8727
8728         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8729                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8730                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8731                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8732                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8733                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8734                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8735                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8736                 </fields>
8737                 <links>
8738                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8739                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8740                 </links>
8741         </class>
8742
8743         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8744                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8745                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8746                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8747                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8748                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8749                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8750                 </fields>
8751                 <links>
8752                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8753                 </links>
8754         </class>
8755
8756         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8757                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8758                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8759                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8760                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8761                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8762                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8763                 </fields>
8764                 <links>
8765                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8766                 </links>
8767         </class>
8768
8769         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8770                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8771                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8772                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8773                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8774                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8775                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8776                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8777                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8778                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8779                 </fields>
8780                 <links>
8781                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8782                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8783                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8784                 </links>
8785         </class>
8786
8787         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8788                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8789                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8790                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8791                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8792                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8793                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8794                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8795                 </fields>
8796                 <links>
8797                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8798                 </links>
8799         </class>
8800
8801         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8802                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8803                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8804                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8805                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8806                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8807                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8808                 </fields>
8809                 <links>
8810                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8811                 </links>
8812         </class>
8813
8814         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8815                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8816                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8817                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8818                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8819                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8820                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8821                 </fields>
8822                 <links>
8823                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8824                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8825                 </links>
8826         </class>
8827
8828         <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">
8829                 <fields oils_persist:primary="id">
8830                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8831                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8832                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8833                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8834                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8835                 </fields>
8836                 <links>
8837                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8838                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8839                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8840                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8841                 </links>
8842         </class>
8843
8844         <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">
8845                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8846                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8847                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8848                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8849                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8850                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8851                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8852                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8853                 </fields>
8854                 <links/>
8855                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8856                         <actions>
8857                                 <retrieve/>
8858                         </actions>
8859                 </permacrud>
8860         </class>
8861
8862         <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">
8863                 <fields oils_persist:primary="ptype_key">
8864                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8865                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8866                 </fields>
8867                 <links/>
8868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8869                         <actions>
8870                                 <retrieve/>
8871                         </actions>
8872                 </permacrud>
8873         </class>
8874
8875         <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">
8876                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8877                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8878                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8879                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8880                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8881                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8882                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8883                 </fields>
8884                 <links>
8885                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8886                 </links>
8887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8888                         <actions>
8889                                 <retrieve/>
8890                         </actions>
8891                 </permacrud>
8892         </class>
8893
8894         <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">
8895                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8896                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8897                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8898                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8899                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8900                 </fields>
8901                 <links>
8902                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8903                 </links>
8904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8905                         <actions>
8906                                 <retrieve/>
8907                         </actions>
8908                 </permacrud>
8909         </class>
8910
8911         <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">
8912                 <fields oils_persist:primary="code">
8913                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8914                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8915                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8916                 </fields>
8917                 <links/>
8918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8919                         <actions>
8920                                 <retrieve/>
8921                         </actions>
8922                 </permacrud>
8923         </class>
8924
8925         <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">
8926                 <oils_persist:source_definition>
8927
8928             SELECT  b.id,
8929                     MAX(dcp.edit_date) AS last_delete_date
8930              FROM   biblio.record_entry b
8931                     JOIN asset.call_number cn ON (cn.record = b.id)
8932                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8933              WHERE  NOT b.deleted
8934              GROUP BY b.id
8935              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8936
8937                 </oils_persist:source_definition>
8938                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8939                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8940                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8941                 </fields>
8942                 <links>
8943                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8944                 </links>
8945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8946                         <actions>
8947                                 <retrieve/>
8948                         </actions>
8949                 </permacrud>
8950         </class>
8951
8952         <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">
8953                 <oils_persist:source_definition>
8954
8955             -- -- 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.
8956             -- -- 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
8957             -- -- may not.
8958             -- SELECT
8959             --     bre.id AS "bib_id",
8960             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8961             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8962             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8963             -- FROM (
8964                 SELECT
8965                     y.bre AS "id",
8966                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8967                     y.hold_count AS "hold_count",
8968                     (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"
8969                 FROM (
8970                         SELECT
8971                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8972                             COUNT(*) AS "hold_count"
8973                         FROM action.hold_request h
8974                         WHERE
8975                             cancel_time IS NULL
8976                             AND fulfillment_time IS NULL
8977                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8978                         GROUP BY 1
8979                     )y LEFT JOIN (
8980                         SELECT 
8981                             (SELECT id
8982                                 FROM biblio.record_entry 
8983                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8984                             ) AS "bre", 
8985                             COUNT(*) AS "copy_count"
8986                         FROM asset.copy
8987                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8988                         WHERE copy.holdable 
8989                             AND NOT copy.deleted 
8990                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8991                         GROUP BY 1
8992                     )x ON x.bre = y.bre
8993                 -- )z RIGHT JOIN (
8994                 --     SELECT id
8995                 --     FROM biblio.record_entry
8996                 --     WHERE NOT deleted
8997                 -- )bre ON (z.bib_id = bre.id)
8998                 
8999
9000                 </oils_persist:source_definition>
9001                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9002                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9003                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9004                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9005                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9006                 </fields>
9007                 <links>
9008                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9009                 </links>
9010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9011                         <actions>
9012                                 <retrieve/>
9013                         </actions>
9014                 </permacrud>
9015         </class>
9016
9017         <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">
9018                 <oils_persist:source_definition>
9019             SELECT *,
9020                 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,
9021                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9022             FROM
9023                 (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
9024                     FROM
9025                         action.hold_request ahr
9026                         JOIN reporter.hold_request_record rhrr USING (id)
9027                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9028                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9029                     WHERE
9030                         ahr.cancel_time IS NULL
9031                         AND ahr.fulfillment_time IS NULL
9032                     GROUP BY bib_record, pickup_lib
9033                 )x
9034                 JOIN
9035                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9036                     FROM
9037                         action.hold_request ahr
9038                         JOIN reporter.hold_request_record rhrr USING (id)
9039                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9040                     WHERE
9041                         ahr.cancel_time IS NULL
9042                         AND ahr.fulfillment_time IS NULL
9043                     GROUP BY bib_record
9044                 )y
9045                 USING (id)
9046                 </oils_persist:source_definition>
9047                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9048                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9049                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9050                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9051                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9052                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9053                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9054                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9055                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9056                 </fields>
9057                 <links>
9058                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9059                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9060                 </links>
9061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9062                         <actions>
9063                                 <retrieve/>
9064                         </actions>
9065                 </permacrud>
9066         </class>
9067
9068         <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">
9069                 <oils_persist:source_definition>
9070             SELECT
9071                 ac.id,
9072                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9073                 MAX(actac.xact_start) AS last_circ
9074             FROM asset.copy ac
9075                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9076             GROUP BY ac.id
9077
9078             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9079             --SELECT
9080             --    ac.id,
9081             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9082             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9083             --FROM asset.copy ac
9084             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9085             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9086             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9087                 </oils_persist:source_definition>
9088                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9089                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9090                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9091                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9092                 </fields>
9093                 <links>
9094                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9095                 </links>
9096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9097                         <actions>
9098                                 <retrieve/>
9099                         </actions>
9100                 </permacrud>
9101         </class>
9102
9103         <!-- ********************************************************************************************************************* -->
9104         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9105         <!-- ********************************************************************************************************************* -->
9106         <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">
9107                 <fields oils_persist:primary="id">
9108                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9109                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9110                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9111                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9112                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9113                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9114                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9115                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9116                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9117                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9118                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9119                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9120                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9121                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9122                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9123                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9124                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9125                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9126                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9127                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9128                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9129                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9130                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9131                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9132                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9133                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9134                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9135                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9136                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9137                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9138                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9139                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9140                 </fields>
9141                 <links>
9142                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9143                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9144                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9145                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9146                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9147                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9148                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9149                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9150                 </links>
9151         </class>
9152
9153         <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">
9154                 <fields oils_persist:primary="id">
9155                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9156                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9157                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9158                 </fields>
9159                 <links>
9160                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9161                 </links>
9162         </class>
9163
9164         <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">
9165                 <fields oils_persist:primary="id">
9166                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9167                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9168                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9169                 </fields>
9170                 <links>
9171                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9172                 </links>
9173         </class>
9174
9175         <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">
9176                 <fields oils_persist:primary="id">
9177                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9178
9179                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9180                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9181                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9182
9183                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9184                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9185                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9186
9187                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9188                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9189
9190                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9191                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9192                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9193
9194                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9195                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9196
9197                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9198                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9199                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9200
9201                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9202                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9203                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9204
9205                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9206                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9207                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9208                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9209
9210                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9211                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9212
9213                 </fields>
9214                 <links>
9215                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9216                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9217                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9218                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9219                 </links>
9220         </class>
9221
9222         <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">
9223                 <oils_persist:source_definition>
9224
9225             SELECT
9226                 po.ordering_agency AS ordering_agency,
9227                 po.id AS purchase_order,
9228                 li.id AS lineitem,
9229                 lid.id AS lineitem_detail,
9230                 cpa.id AS claim_policy_action
9231             FROM
9232                 acq.lineitem_detail lid
9233                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9234                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9235                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9236                 JOIN acq.claim_policy_action cpa ON (
9237                     cpa.claim_policy = cp.id
9238
9239                     -- we only care about claim policy actions whose claim
9240                     -- interval we'd reached or exceeded
9241                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9242
9243                     -- filter out all claim policy actions where claim events
9244                     -- have occurred on or after the action's action_interval
9245                     AND NOT EXISTS (
9246                         SELECT 1
9247                         FROM
9248                             acq.claim_event evt
9249                             JOIN acq.claim claim ON (
9250                                 claim.id = evt.claim
9251                                 AND claim.lineitem_detail = lid.id
9252                             )
9253                         WHERE
9254                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9255                     )
9256                 )
9257             WHERE
9258                 lid.cancel_reason IS NULL
9259                 AND li.cancel_reason IS NULL -- belt/suspenders
9260                 AND po.cancel_reason IS NULL -- belt/suspenders
9261                 AND lid.recv_time IS NULL
9262                 AND po.state = 'on-order'
9263             ORDER BY 1, 2, 3, 4, 5
9264
9265                 </oils_persist:source_definition>
9266                 <fields>
9267                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9268                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9269                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9270                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9271                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9272                 </fields>
9273                 <links>
9274                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9275                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9276                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9277                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9278                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9279                 </links>
9280         </class>
9281
9282         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9283                 <oils_persist:source_definition>
9284
9285             SELECT 
9286                 li.id AS lineitem, 
9287                 (
9288                     SELECT COUNT(lid.id) 
9289                     FROM acq.lineitem_detail lid
9290                     WHERE lineitem = li.id
9291                 ) AS item_count,
9292                 (
9293                     SELECT COUNT(lid.id) 
9294                     FROM acq.lineitem_detail lid
9295                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9296                 ) AS recv_count,
9297                 (
9298                     SELECT COUNT(lid.id) 
9299                     FROM acq.lineitem_detail lid
9300                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9301                 ) AS cancel_count,
9302                 (
9303                     SELECT COUNT(lid.id) 
9304                     FROM acq.lineitem_detail lid
9305                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9306                     WHERE NOT debit.encumbrance AND lineitem = li.id
9307                 ) AS invoice_count,
9308                 (
9309                     SELECT COUNT(DISTINCT(lid.id)) 
9310                     FROM acq.lineitem_detail lid
9311                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9312                     WHERE lineitem = li.id
9313                 ) AS claim_count,
9314                 (
9315                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9316                     FROM acq.lineitem_detail lid
9317                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9318                 ) AS estimated_amount,
9319                 (
9320                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9321                     FROM acq.lineitem_detail lid
9322                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9323                     WHERE debit.encumbrance AND lineitem = li.id
9324                 ) AS encumbrance_amount,
9325                 (
9326                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9327                     FROM acq.lineitem_detail lid
9328                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9329                     WHERE NOT debit.encumbrance AND lineitem = li.id
9330                 ) AS paid_amount
9331
9332                 FROM acq.lineitem AS li
9333         </oils_persist:source_definition>
9334                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9335                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9336                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9337                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9338                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9339                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9340                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9341                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9342                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9343                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9344                 </fields>
9345                 <links>
9346                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9347                 </links>
9348     </class>
9349
9350
9351         <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">
9352                 <oils_persist:source_definition>
9353
9354                         SELECT  t.*
9355                           FROM  action.transit_copy t
9356                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9357                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9358                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9359
9360                 </oils_persist:source_definition>
9361                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9362                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9363                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9364                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9365                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9366                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9367                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9368                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9369                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9370                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9371                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9372                 </fields>
9373                 <links>
9374                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9375                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9376                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9377                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9378                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9379                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9380                 </links>
9381         </class>
9382
9383     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9384                 <oils_persist:source_definition>
9385
9386         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9387                 SELECT
9388                         cp.id as copy,
9389                         COUNT(circ.id),
9390                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9391                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9392                 FROM
9393                         asset.copy cp
9394                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9395                 GROUP BY 1, 3, 4
9396                 UNION
9397                 SELECT
9398                         cp.id as copy,
9399                         COUNT(circ.id),
9400                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9401                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9402                 FROM
9403                         asset.copy cp
9404                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9405                 GROUP BY 1, 3, 4
9406                 UNION
9407                 SELECT
9408                         id as copy,
9409                         circ_count,
9410                         -1 AS year,
9411                         false as is_renewal
9412                 FROM
9413                         extend_reporter.legacy_circ_count
9414         )x GROUP BY 1, 3, 4
9415
9416                 </oils_persist:source_definition>
9417         <fields>
9418             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9419             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9420             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9421             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9422         </fields>
9423                 <links>
9424                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9425                 </links>
9426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9427                         <actions>
9428                                 <retrieve/>
9429                         </actions>
9430                 </permacrud>
9431     </class>
9432
9433         <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">
9434                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9435                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9436                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9437                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9438                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9439                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9440                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9441                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9442                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9443                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9444                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9445                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9446                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9447                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9448                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9449                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9450                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9451                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9452                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9453                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9454                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9455                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9456                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9457                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9458                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9459                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9460                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9461                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9462                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9463                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9464                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9465                 </fields>
9466                 <links>
9467                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9468                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9469                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9470                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9471                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9472                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9473                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9474                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9475                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9476                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9477                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9478                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9479                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9480                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9481                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9482                 </links>
9483         </class>
9484
9485     <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">
9486         <fields oils_persist:primary="id">
9487             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9488             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9489             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9490             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9491             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9492             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9493             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9494             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9495             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9496             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9497             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9498             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9499             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9500             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9501             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9502             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9503             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9504             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9505             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9506             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9507             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9508             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9509             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9510             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9511             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9512             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9513             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9514             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9515             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9516             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9517             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9518             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9519             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9520             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9521         </fields>
9522         <links>
9523             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9524             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9525             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9526             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9527             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9528         </links>
9529     </class>
9530
9531     <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">
9532         <fields oils_persist:primary="id">
9533             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9534             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9535             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9536             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9537         </fields>
9538         <links>
9539             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9540             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9541         </links>
9542     </class>
9543
9544     <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">
9545         <fields oils_persist:primary="owning_lib">
9546             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9547             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9548             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9549         </fields>
9550         <links>
9551             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9552         </links>
9553     </class>
9554
9555     <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">
9556         <fields oils_persist:primary="id">
9557             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9558             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9559             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9560             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9561             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9562         </fields>
9563         <links>
9564             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9565             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9566             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9567         </links>
9568     </class>
9569
9570     <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">
9571         <fields oils_persist:primary="circ_lib">
9572             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9573             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9574             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9575             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9576         </fields>
9577         <links>
9578             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9579             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9580         </links>
9581     </class>
9582
9583     <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">
9584         <fields oils_persist:primary="id">
9585             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9586             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9587             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9588             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9589             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9590         </fields>
9591         <links>
9592             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9593             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9594             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9595         </links>
9596     </class>
9597
9598     <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">
9599         <fields oils_persist:primary="home_ou">
9600             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9601             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9602             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9603             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9604         </fields>
9605         <links>
9606             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9607             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9608         </links>
9609     </class>
9610         <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">
9611                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9612                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9613                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9614                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9615                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9616                 </fields>
9617                 <links>
9618                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9619                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9620                 </links>
9621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9622                         <actions>
9623                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9624                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9625                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9626                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9627                         </actions>
9628                 </permacrud>
9629         </class>
9630         <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">
9631                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9632                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9633                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9634                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9635                 </fields>
9636                 <links>
9637                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9638                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9639                         </links>
9640                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9641                 <actions>
9642                                 <create permission="ADMIN_ACQ_FUND_TAG">
9643                                         <context link="tag" field="owner"/>
9644                                 </create>
9645                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9646                                         <context link="tag" field="owner"/>
9647                                 </retrieve>
9648                                 <update permission="ADMIN_ACQ_FUND_TAG">
9649                                         <context link="tag" field="owner"/>
9650                                 </update>
9651                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9652                                         <context link="tag" field="owner"/>
9653                                 </delete>
9654                         </actions>
9655                 </permacrud>
9656         </class>
9657         <class id="acqus" controller="open-ils.cstore" oils_obj:fieldmapper="acq::unified_search" reporter:label="Acq Unified Search View" oils_persist:readonly="true">
9658                 <oils_persist:source_definition><![CDATA[
9659                 SELECT
9660                         jub.id AS lineitem,
9661                         po.id AS purchase_order,
9662                         pl.id AS picklist,
9663                         inv.id AS invoice
9664                 FROM acq.purchase_order po
9665                 FULL JOIN acq.lineitem jub ON (jub.purchase_order = po.id)
9666                 FULL JOIN acq.picklist pl ON (pl.id = jub.picklist)
9667                 LEFT JOIN acq.po_item poi ON (poi.purchase_order = po.id)
9668                 LEFT JOIN acq.invoice_item ii
9669                         ON (ii.po_item = poi.id OR ii.purchase_order = po.id)
9670                 LEFT JOIN acq.invoice_entry ie
9671                         ON (ie.lineitem = jub.id OR ie.purchase_order = po.id)
9672                 LEFT JOIN acq.invoice inv
9673                         ON (ie.invoice = inv.id OR ii.invoice = inv.id)
9674                 ]]></oils_persist:source_definition>
9675                 <fields>
9676                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
9677                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
9678                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
9679                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link"/>
9680                 </fields>
9681                 <links>
9682                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
9683                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
9684                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
9685                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
9686                 </links>
9687         </class>
9688         <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">
9689                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9690                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9691                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9692                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9693                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9694                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9695                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9696                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9697                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9698                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9699                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9700                 </fields>
9701                 <links>
9702                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9703                 </links>
9704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9705                         <actions>
9706                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9707                                 <retrieve/>
9708                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9709                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9710                         </actions>
9711                 </permacrud>
9712         </class>
9713
9714         <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">
9715                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9716                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9717                         <field name="date_applied" reporter:datatype="timestamp"/>
9718                         <field name="org" reporter:datatype="org_unit"/>
9719                         <field name="original_value" reporter:datatype="text"/>
9720                         <field name="new_value" reporter:datatype="text"/>
9721                         <field name="field_name" reporter:datatype="link"/>
9722                 </fields>
9723                 <links>
9724                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9725                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9726                 </links>
9727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9728                         <actions>
9729                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9730                                 <retrieve/>
9731                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9732                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9733                         </actions>
9734                 </permacrud>
9735         </class>
9736         <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">
9737                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9738                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9739                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9740                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9741                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9742                 </fields>
9743                 <links>
9744                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9745                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
9746                 </links>
9747         </class>
9748         <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">
9749                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9750                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9751                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9752                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9753                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9754                 </fields>
9755                 <links>
9756                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9757                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
9758                 </links>
9759         </class>
9760
9761
9762         <!-- ********************************************************************************************************************* -->
9763
9764 </IDL>
9765
9766 <!--
9767     vim:noet:ts=4:sw=4:
9768 -->