]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Add accepting_usr to IDL to fix reporter field
[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 VIEW_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 VIEW_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="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1300             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1301             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1302             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1303             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1304         </fields>
1305         <links/>
1306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1307             <actions>
1308                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1309                 <retrieve/>
1310                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1311                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1312             </actions>
1313         </permacrud>
1314     </class>
1315
1316     <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">
1317         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1318             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1319             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1320             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1321             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1322             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1323             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1324             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1325             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1326             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1327             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1328             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1329             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1330             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1331             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1332             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1333             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1334             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1335             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1336         </fields>
1337         <links/>
1338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1339             <actions>
1340                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1341                 <retrieve/>
1342                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1343                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1344             </actions>
1345         </permacrud>
1346     </class>
1347
1348     <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">
1349         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1350             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1351             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1352             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1353             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1354             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1355         </fields>
1356         <links>
1357             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1358             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1359             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1360         </links>
1361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1362             <actions>
1363                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1364                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1365                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1366                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1367             </actions>
1368         </permacrud>
1369     </class>
1370
1371         <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">
1372                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1373                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1374                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1375                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1376                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1377                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1378                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1379                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1380                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1381                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1382                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1383                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1384                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1385                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1386                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1387                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1388                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1389             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1390                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1391                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1392                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1393                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1394                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1395                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1396                 </fields>
1397                 <links>
1398                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1399                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1400                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1401                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1402                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1403                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1404                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1405                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1406                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1407                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1408                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1409                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1410                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1411             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1412                 </links>
1413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1414             <actions>
1415                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1416                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1417                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1418                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1419             </actions>
1420         </permacrud>
1421         </class>
1422
1423         <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">
1424                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1425                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1426                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1427                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1428                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1429                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1430                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1431                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1432                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1433                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1434                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1435                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1436                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1437                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1438                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1439             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1440                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1441                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1442             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1443                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1444                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1445                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1446                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1447             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1448             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1449             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1450                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1451                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1452                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1453                 </fields>
1454                 <links>
1455                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1456                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1457                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1458                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1459                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1460                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1461                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1462                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1463                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1464                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1465                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1466                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1467                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1468             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1469                 </links>
1470         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1471             <actions>
1472                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1473                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1474                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1475                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1476             </actions>
1477         </permacrud>
1478         </class>
1479
1480     <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">
1481         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1482             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1483             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1484             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1485         </fields>
1486         <links/>
1487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1488             <actions>
1489                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1490                 <retrieve/>
1491                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1492                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1493             </actions>
1494         </permacrud>
1495     </class>
1496
1497     <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">
1498         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1499             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1500             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1501             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1502             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1503             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1504             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1505             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1506         </fields>
1507         <links>
1508             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1509         </links>
1510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1511             <actions>
1512                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1513                 <retrieve/>
1514                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1515                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1516             </actions>
1517         </permacrud>
1518     </class>
1519
1520     <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">
1521         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1522             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1523             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1524             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1525             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1526             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1527         </fields>
1528         <links>
1529             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1530             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1531         </links>
1532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1533             <actions>
1534                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1535                     <context link="matchpoint" field="org_unit"/>
1536                 </create>
1537                 <retrieve/>
1538                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1539                     <context link="matchpoint" field="org_unit"/>
1540                 </update>
1541                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1542                     <context link="matchpoint" field="org_unit"/>
1543                 </delete>
1544             </actions>
1545         </permacrud>
1546     </class>
1547
1548     <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">
1549         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1550             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1551             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1552             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1553         </fields>
1554         <links>
1555             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1556             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1557         </links>
1558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1559             <actions>
1560                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1561                     <context link="limit_set" field="owning_lib"/>
1562                 </create>
1563                 <retrieve/>
1564                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1565                     <context link="limit_set" field="owning_lib"/>
1566                 </update>
1567                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1568                     <context link="limit_set" field="owning_lib"/>
1569                 </delete>
1570             </actions>
1571         </permacrud>
1572     </class>
1573
1574     <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">
1575         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1576             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1577             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1578             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1579             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1580         </fields>
1581         <links>
1582             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1583             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1584         </links>
1585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1586             <actions>
1587                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1588                     <context link="limit_set" field="owning_lib"/>
1589                 </create>
1590                 <retrieve/>
1591                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1592                     <context link="limit_set" field="owning_lib"/>
1593                 </update>
1594                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1595                     <context link="limit_set" field="owning_lib"/>
1596                 </delete>
1597             </actions>
1598         </permacrud>
1599     </class>
1600
1601         <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">
1602                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1603                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1604                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1605                 </fields>
1606                 <links/>
1607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1608             <actions>
1609                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1610                 <retrieve/>
1611                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1612                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1613             </actions>
1614         </permacrud>
1615         </class>
1616
1617         <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">
1618                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1619                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1620                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1621                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1622                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1623                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1624                 </fields>
1625                 <links>
1626                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1627                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1628                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1629                 </links>
1630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1631             <actions>
1632                 <create permission="ADMIN_SURVEY">
1633                     <context link="survey" field="owner"/>
1634                 </create>
1635                 <retrieve/>
1636                 <update permission="ADMIN_SURVEY">
1637                     <context link="survey" field="owner"/>
1638                 </update>
1639                 <delete permission="ADMIN_SURVEY">
1640                     <context link="survey" field="owner"/>
1641                 </delete>
1642             </actions>
1643         </permacrud>
1644         </class>
1645         <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">
1646                 <fields oils_persist:primary="id" oils_persist:sequence="">
1647                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1648                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1649                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1650                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1651                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1652                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1653                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1654                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1655                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1656                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1657                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1658                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1659                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1660                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1661                 </fields>
1662                 <links>
1663                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1664                 </links>
1665         </class>
1666         <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">
1667                 <fields oils_persist:primary="id" oils_persist:sequence="">
1668                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1669                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1670                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1671                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1672                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1673                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1674                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1675                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1676                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1677                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1678                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1679                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1680                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1681                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1682                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1683                 </fields>
1684                 <links>
1685                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1686                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1687                 </links>
1688         </class>
1689         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1690                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1691                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1692                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1693                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1694                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1695                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1696                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1697                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1698                 </fields>
1699                 <links>
1700                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1701                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1702                 </links>
1703         </class>
1704         <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">
1705                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1706                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1707                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1708                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1709                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1710                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1711                 </fields>
1712                 <links>
1713                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1714                 </links>
1715         </class>
1716         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1717                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1718                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1719                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1720                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1721                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1722                 </fields>
1723                 <links>
1724                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1725                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1726                 </links>
1727         </class>
1728         <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">
1729                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1730                         <field name="field" reporter:datatype="link"/>
1731                         <field name="id" reporter:datatype="id" />
1732                         <field name="source" reporter:datatype="link"/>
1733                         <field name="value" reporter:datatype="text"/>
1734                 </fields>
1735                 <links>
1736                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1737                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1738                 </links>
1739         </class>
1740         <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">
1741                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1742                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1743                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1744                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1745                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1746                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1747                 </fields>
1748                 <links>
1749                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1750                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1751                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1752                 </links>
1753         </class>
1754         <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">
1755                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1756                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1757                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1758                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1759                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1760                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1761                 </fields>
1762                 <links>
1763                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1764                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1765                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1766                 </links>
1767         </class>
1768         <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">
1769                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1770                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1771                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1772                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1773                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1774                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1775                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1776                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1777                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1778                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1779                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1780                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1781                 </fields>
1782                 <links>
1783                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1784                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1785                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1786                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1787                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1788                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1789                 </links>
1790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1791             <actions>
1792                 <create permission="TRANSIT_COPY" context_field="owner">
1793                     <context link="target_copy" field="circ_lib"/>
1794                 </create>
1795                 <retrieve/>
1796                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1797                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1798             </actions>
1799         </permacrud>
1800         </class>
1801         <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">
1802                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1803                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1804                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1805                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1806                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1807                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1808                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1809                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1810                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1811                 </fields>
1812                 <links>
1813                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1814                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1815                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1816                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1817                 </links>
1818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1819             <actions>
1820                 <create permission="ADMIN_SURVEY">
1821                     <context link="survey" field="owner"/>
1822                 </create>
1823                 <retrieve/>
1824                 <update permission="ADMIN_SURVEY">
1825                     <context link="survey" field="owner"/>
1826                 </update>
1827                 <delete permission="ADMIN_SURVEY">
1828                     <context link="survey" field="owner"/>
1829                 </delete>
1830             </actions>
1831         </permacrud>
1832         </class>
1833         <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">
1834                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1835                         <field name="bucket" />
1836                         <field name="id" reporter:datatype="id" />
1837                         <field name="target_copy" reporter:datatype="link"/>
1838                         <field name="create_time" reporter:datatype="timestamp" />
1839                         <field name="pos" reporter:datatype="int" />
1840                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1841                 </fields>
1842                 <links>
1843                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1844                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1845             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1846                 </links>
1847         </class>
1848         <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">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1850                         <field name="id" reporter:datatype="id" />
1851                         <field name="item" reporter:datatype="link"/>
1852                         <field name="note" reporter:datatype="text" />
1853                 </fields>
1854                 <links>
1855                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1856                 </links>
1857         </class>
1858
1859         <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">
1860                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1861                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1862                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1863                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1864                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1865                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1866                 </fields>
1867                 <links>
1868                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1869                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1870                 </links>
1871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1872                         <actions>
1873                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1874                                 <retrieve/>
1875                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1876                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1877                         </actions>
1878                 </permacrud>
1879         </class>
1880
1881         <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">
1882                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1883                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1884                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1885                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1886                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1887                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1888                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
1889                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1890                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1891                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1892                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1893                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1894                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1895                 </fields>
1896                 <links>
1897                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1898                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1899                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1900                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1901                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1902                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1903                 </links>
1904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1905                         <actions>
1906                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1907                                 <retrieve/>
1908                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1909                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1910                         </actions>
1911                 </permacrud>
1912         </class>
1913
1914         <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">
1915                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1916                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1917                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1918                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1919                 </fields>
1920                 <links>
1921                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1922                 </links>
1923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1924                         <actions>
1925                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1926                                 <retrieve/>
1927                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1928                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1929                         </actions>
1930                 </permacrud>
1931         </class>
1932
1933         <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">
1934                 <fields oils_persist:primary="code">
1935                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1936                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1937                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1938                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1939                 </fields>
1940                 <links>
1941                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1942                 </links>
1943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1944                         <actions>
1945                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1946                                 <retrieve/>
1947                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1948                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1949                         </actions>
1950                 </permacrud>
1951         </class>
1952
1953         <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">
1954                 <fields oils_persist:primary="code">
1955                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1956                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1957                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1958                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1959                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1960                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1961                 </fields>
1962                 <links>
1963                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1964                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1965                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1966                 </links>
1967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1968                         <actions>
1969                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1970                                 <retrieve/>
1971                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1972                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1973                         </actions>
1974                 </permacrud>
1975         </class>
1976
1977     <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">
1978         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1979             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1980             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1981             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1982         </fields>
1983         <links>
1984             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1985             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1986         </links>
1987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1988             <actions>
1989                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1990                 <retrieve/>
1991                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1992                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1993             </actions>
1994         </permacrud>
1995     </class>
1996
1997         <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">
1998                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1999                         <field name="active" reporter:datatype="bool"/>
2000                         <field name="create_date" reporter:datatype="timestamp"/>
2001                         <field name="creator" />
2002                         <field name="deleted" reporter:datatype="bool"/>
2003                         <field name="edit_date" reporter:datatype="timestamp"/>
2004                         <field name="editor" />
2005                         <field name="id" reporter:datatype="id" />
2006                         <field name="last_xact_id" />
2007                         <field name="marc" />
2008                         <field name="source" />
2009                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2010                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2011                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2012                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2013                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2014                 </fields>
2015                 <links>
2016                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2017                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2018                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2019                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2020                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2021                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2022                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2023                 </links>
2024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2025                         <actions>
2026                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2027                                 <retrieve/>
2028                                 <update permission="UPDATE_MARC" global_required="true"/>
2029                                 <delete permission="UPDATE_MARC" global_required="true"/>
2030                         </actions>
2031                 </permacrud>
2032         </class>
2033         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2034                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2035                         <field name="char_encoding" />
2036                         <field name="id" />
2037                         <field name="record" />
2038                         <field name="record_status" />
2039                         <field name="thesaurus" />
2040                 </fields>
2041                 <links>
2042                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2043                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2044                 </links>
2045         </class>
2046         <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">
2047                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2048                         <field name="id" reporter:datatype="id" />
2049                         <field name="bib" reporter:datatype="link" />
2050                         <field name="authority" reporter:datatype="link" />
2051                 </fields>
2052                 <links>
2053                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2054                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2055                 </links>
2056         </class>
2057         <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">
2058                 <fields oils_persist:primary="code" oils_persist:sequence="">
2059                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2060                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2061                 </fields>
2062                 <links/>
2063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2064             <actions>
2065                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2066                 <retrieve/>
2067                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2068                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2069             </actions>
2070         </permacrud>
2071         </class>
2072         <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">
2073                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2074                         <field name="accepting_usr" />
2075                         <field name="amount" reporter:datatype="money" />
2076                         <field name="amount_collected" reporter:datatype="money" />
2077                         <field name="approval_code" reporter:datatype="text"/>
2078                         <field name="cash_drawer" reporter:datatype="link"/>
2079                         <field name="cc_first_name" reporter:datatype="text"/>
2080                         <field name="cc_last_name" reporter:datatype="text"/>
2081                         <field name="cc_number" reporter:datatype="text"/>
2082                         <field name="cc_order_number" reporter:datatype="text"/>
2083                         <field name="cc_type" reporter:datatype="text"/>
2084                         <field name="cc_processor" reporter:datatype="text"/>
2085                         <field name="expire_month" reporter:datatype="int" />
2086                         <field name="expire_year" reporter:datatype="int" />
2087                         <field name="id" reporter:datatype="id" />
2088                         <field name="note" reporter:datatype="text"/>
2089                         <field name="payment_ts" reporter:datatype="timestamp"/>
2090                         <field name="xact" reporter:datatype="link"/>
2091                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2092                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2093                 </fields>
2094                 <links>
2095                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2096                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2097                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2098                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2099                 </links>
2100         </class>
2101         <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">
2102                 <fields oils_persist:primary="name">
2103                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2104                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2105                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2106                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2107                 </fields>
2108                 <links/>
2109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2110             <actions>
2111                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2112                 <retrieve/>
2113                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2114                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2115             </actions>
2116         </permacrud>
2117         </class>
2118
2119         <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">
2120                 <fields oils_persist:primary="alias">
2121                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2122                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2123                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2124                 </fields>
2125                 <links>
2126                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2127                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2128                 </links>
2129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2130             <actions>
2131                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2132                 <retrieve/>
2133                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2134                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2135             </actions>
2136         </permacrud>
2137         </class>
2138
2139         <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">
2140                 <fields oils_persist:primary="name">
2141                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2142                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2143                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2144                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2145                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2146                 </fields>
2147                 <links>
2148                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2149                 </links>
2150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2151             <actions>
2152                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2153                 <retrieve/>
2154                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2155                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2156             </actions>
2157         </permacrud>
2158         </class>
2159
2160         <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">
2161                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2162                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2163                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2164                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2165                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2166                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2167                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2168                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2169                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2170                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2171                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2172                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2173                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2174                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2175                 </fields>
2176                 <links>
2177                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2178                 </links>
2179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2180             <actions>
2181                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2182                 <retrieve/>
2183                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2184                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2185             </actions>
2186         </permacrud>
2187         </class>
2188         <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">
2189                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2190                         <field name="id" reporter:datatype="id" />
2191                         <field name="name" reporter:datatype="text"/>
2192                         <field name="xpath" reporter:datatype="text"/>
2193                         <field name="format" reporter:datatype="link"/>
2194                         <field name="first_word" reporter:datatype="bool" />
2195                 </fields>
2196                 <links/>
2197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2198             <actions>
2199                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2200                 <retrieve/>
2201                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2202                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2203             </actions>
2204         </permacrud>
2205         </class>
2206         <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">
2207                 <fields oils_persist:primary="code" oils_persist:sequence="">
2208                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2209                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2210                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2211                 </fields>
2212                 <links/>
2213         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2214             <actions>
2215                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2216                 <retrieve/>
2217                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2218                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2219             </actions>
2220         </permacrud>
2221         </class>
2222         <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">
2223                 <fields oils_persist:primary="code" oils_persist:sequence="">
2224                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2225                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2226                 </fields>
2227                 <links/>
2228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2229             <actions>
2230                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2231                 <retrieve/>
2232                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2233                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2234             </actions>
2235         </permacrud>
2236         </class>
2237     <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">
2238         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2239             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2240             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2241             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2242             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2243         </fields>
2244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2245             <actions>
2246                 <retrieve/>
2247             </actions>
2248         </permacrud>
2249     </class>
2250         <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">
2251                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2252                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2253                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2254                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2255                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2256                 </fields>
2257                 <links>
2258                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2259                 </links>
2260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2261             <actions>
2262                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2263                 <retrieve/>
2264                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2265                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2266             </actions>
2267         </permacrud>
2268         </class>
2269         <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">
2270                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2271                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2272                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2273                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2274                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2275                 </fields>
2276                 <links>
2277                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2278                 </links>
2279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2280             <actions>
2281                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2282                 <retrieve/>
2283                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2284                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2285             </actions>
2286         </permacrud>
2287         </class>
2288         <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">
2289                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2290                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2291                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2292                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2293                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2294                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2295                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2296                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2297                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2298                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2299                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2300                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2301                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2302                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2303                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2304                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2305                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2306                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2307                 </fields>
2308                 <links>
2309                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2310                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2311                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2313                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2314                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2315                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2316                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2317                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2318                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2319                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2320                 </links>
2321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2322             <actions>
2323                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2324                 <retrieve/>
2325                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2326                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2327             </actions>
2328         </permacrud>
2329         </class>
2330         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2331                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2332                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2333                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2334                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2335                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2336                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2337                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2338                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2339                 </fields>
2340                 <links>
2341                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2342                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2343         </links>
2344         </class>
2345         <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">
2346                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2347                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2348                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2349                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2350                 </fields>
2351                 <links>
2352                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2353                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2354                 </links>
2355         </class>
2356         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2357                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2358                         <field name="id" reporter:datatype="id" />
2359                         <field name="value" oils_persist:i18n="true" />
2360                 </fields>
2361                 <links/>
2362         </class>
2363         <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">
2364                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2365                         <field name="balance_owed" reporter:datatype="money" />
2366                         <field name="total_owed" reporter:datatype="money" />
2367                         <field name="total_paid" reporter:datatype="money" />
2368                         <field name="usr" reporter:datatype="link"/>
2369                 </fields>
2370                 <links>
2371                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2372         </links>
2373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2374             <actions>
2375                 <retrieve permission="VIEW_USER">
2376                     <context link="usr" field="home_ou"/>
2377                 </retrieve>
2378             </actions>
2379         </permacrud>
2380         </class>
2381         <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">
2382                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2383                         <field name="collector" />
2384                         <field name="enter_time" reporter:datatype="timestamp"/>
2385                         <field name="id" reporter:datatype="id" />
2386                         <field name="location" reporter:datatype="link"/>
2387                         <field name="usr" reporter:datatype="link"/>
2388                 </fields>
2389                 <links>
2390                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2391                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2392                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2393                 </links>
2394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2395             <actions>
2396                 <create permission="money.collections_tracker.create" context_field="location"/>
2397                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2398                 <delete permission="money.collections_tracker.create" context_field="location"/>
2399             </actions>
2400         </permacrud>
2401         </class>
2402         <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">
2403                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2404                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2405                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2406                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2407                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2408                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2409                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2410                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2411                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2412                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2413                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2414                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2415                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2416                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2417                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2418                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2419                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2420                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2421                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2422                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2423                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2424                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2425                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2426                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2427                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2428                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2429                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2430                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2431                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2432                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2433                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2434                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2435                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2436                 </fields>
2437                 <links>
2438                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2439                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2440                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2441                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2442                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2443                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2444                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2445                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2446                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2447                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2448                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2449                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2450                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2451                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2452                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2453                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2454                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2455                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2456                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2457                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2458                 </links>
2459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2460             <actions>
2461                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2462                 <retrieve/>
2463                 <update permission="UPDATE_MARC" global_required="true"/>
2464             </actions>
2465         </permacrud>
2466         </class>
2467         <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">
2468                 <fields oils_persist:primary="id">
2469                         <field name="dow_0_close" />
2470                         <field name="dow_0_open" />
2471                         <field name="dow_1_close" />
2472                         <field name="dow_1_open" />
2473                         <field name="dow_2_close" />
2474                         <field name="dow_2_open" />
2475                         <field name="dow_3_close" />
2476                         <field name="dow_3_open" />
2477                         <field name="dow_4_close" />
2478                         <field name="dow_4_open" />
2479                         <field name="dow_5_close" />
2480                         <field name="dow_5_open" />
2481                         <field name="dow_6_close" />
2482                         <field name="dow_6_open" />
2483                         <field name="id" reporter:datatype="id" />
2484                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2485                 </fields>
2486                 <links>
2487                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2488                 </links>
2489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2490             <actions>
2491                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2492                 <retrieve/>
2493                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2494                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2495             </actions>
2496         </permacrud>
2497         </class>
2498         <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">
2499                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2500                         <field name="id" reporter:datatype="id" />
2501                         <field name="record" reporter:datatype="link"/>
2502                         <field name="label" reporter:datatype="text"/>
2503                         <field name="label_sortkey" reporter:datatype="text"/>
2504                 </fields>
2505                 <links>
2506                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2507                 </links>
2508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2509             <actions>
2510                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2511                 <retrieve/>
2512                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2513                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2514             </actions>
2515         </permacrud>
2516         </class>
2517         <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">
2518                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2519                         <field name="id" reporter:datatype="id" />
2520                         <field name="target_copy" reporter:datatype="link" />
2521                         <field name="part" reporter:datatype="link"/>
2522                 </fields>
2523                 <links>
2524                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2525                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2526                 </links>
2527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2528             <actions>
2529                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2530                 <retrieve/>
2531                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2532                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2533             </actions>
2534         </permacrud>
2535         </class>
2536         <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">
2537                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2538                         <field name="close_end" reporter:datatype="timestamp" />
2539                         <field name="close_start" reporter:datatype="timestamp" />
2540                         <field name="id" reporter:datatype="id" />
2541                         <field name="org_unit" reporter:datatype="org_unit"/>
2542                         <field name="reason" reporter:datatype="text"/>
2543                 </fields>
2544                 <links>
2545                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2546                 </links>
2547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2548             <actions>
2549                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2550                 <retrieve/>
2551                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2552                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2553             </actions>
2554         </permacrud>
2555         </class>
2556         <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">
2557                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2558                         <field name="extended" reporter:datatype="interval"/>
2559                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2560                         <field name="max_renewals" reporter:datatype="int" />
2561                         <field name="name" reporter:datatype="text"/>
2562                         <field name="normal" reporter:datatype="interval"/>
2563                         <field name="shrt" reporter:datatype="interval"/>
2564                 </fields>
2565                 <links>
2566                 </links>
2567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2568             <actions>
2569                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2570                 <retrieve/>
2571                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2572                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2573             </actions>
2574         </permacrud>
2575         </class>
2576
2577         <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">
2578                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2579                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2580                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2581             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2582                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2583             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2584                 </fields>
2585                 <links>
2586             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2587                 </links>
2588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2589             <actions>
2590                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2591                 <retrieve/>
2592                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2593                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2594             </actions>
2595                 </permacrud>
2596         </class>
2597
2598         <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">
2599                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2600                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2601                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2602                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2603             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2604                 </fields>
2605                 <links>
2606                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2607                 </links>
2608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2609             <actions>
2610                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2611                 <retrieve/>
2612                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2613                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2614             </actions>
2615                 </permacrud>
2616         </class>
2617
2618         <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">
2619                 <fields oils_persist:primary="id" oils_persist:sequence="">
2620                         <field name="balance_owed" reporter:datatype="money"/>
2621                         <field name="id" reporter:datatype="id" />
2622                         <field name="last_billing_note" reporter:datatype="text"/>
2623                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2624                         <field name="last_billing_type" reporter:datatype="text"/>
2625                         <field name="last_payment_note" reporter:datatype="text"/>
2626                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2627                         <field name="last_payment_type" reporter:datatype="text"/>
2628                         <field name="total_owed" reporter:datatype="money"/>
2629                         <field name="total_paid" reporter:datatype="money"/>
2630                         <field name="usr" reporter:datatype="link"/>
2631                         <field name="xact_finish" reporter:datatype="timestamp" />
2632                         <field name="xact_start" reporter:datatype="timestamp" />
2633                         <field name="xact_type" reporter:datatype="text"/>
2634                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2635                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2636                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2637                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2638                         <field name="billing_location" reporter:datatype="link"/>
2639                 </fields>
2640                 <links>
2641                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2642                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2643                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2644                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2645                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2646                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2647                 </links>
2648         </class>
2649         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2650                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2651                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2652                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2653                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2654                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2655                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2656                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2657                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2658                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2659                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2660                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2661                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2662                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2663                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2664                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2665                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2666                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2667                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2668                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2669                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2670                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2671                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2672                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2673                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2674                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2675                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2676                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2677                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2678                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2679                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2680                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2681                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2682                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2683                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2684                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2685                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2686                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2687                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2688                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2689                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2690                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2691                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2692                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2693                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2694                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2695                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2696                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2697                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2698                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2699                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2700                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2701                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2702                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2703                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2704                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2705                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2706                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2707                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2708                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2709                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2710                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2711                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2712                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2713                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2714                 </fields>
2715                 <links>
2716                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2717                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2718                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2719                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2720                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2721                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2722                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2723                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2724                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2725                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2726                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2727                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2728                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2729                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2730                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2731                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2732                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2733                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2734                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2735                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2736                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2737                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2738                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2739                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2740                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2741                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2742                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2743                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2744                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2745                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2746                 </links>
2747         </class>
2748         <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">
2749                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2750                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2751                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2752                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2753                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2754                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2755                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2756                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2757                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2758         </fields>
2759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2760                         <actions>
2761                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2762                                 <retrieve/>
2763                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2764                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2765                         </actions>
2766                 </permacrud>
2767         </class>
2768         <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">
2769                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2770                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2771                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2772                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2773                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2774         </fields>
2775         <links>
2776                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2777                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2778                 </links>
2779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2780                         <actions>
2781                                 <retrieve permission="RUN_REPORTS">
2782                                         <context link="usr" field="home_ou" />
2783                                 </retrieve>
2784                         </actions>
2785                 </permacrud>
2786         </class>
2787         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2788                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2789                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2790                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2791                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2792                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2793                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2794                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2795         </fields>
2796         <links>
2797                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2798                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2799                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2800                 </links>
2801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2802                         <actions>
2803                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2804                                         <context link="usr" field="home_ou" />
2805                                         <context link="ws" field="owning_lib" />
2806                                 </retrieve>
2807                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2808                                         <context link="usr" field="home_ou" />
2809                                         <context link="ws" field="owning_lib" />
2810                                 </create>
2811                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2812                                         <context link="usr" field="home_ou" />
2813                                         <context link="ws" field="owning_lib" />
2814                                 </update>
2815                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2816                                         <context link="usr" field="home_ou" />
2817                                         <context link="ws" field="owning_lib" />
2818                                 </delete>
2819                         </actions>
2820                 </permacrud>
2821         </class>
2822         <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">
2823                 <fields oils_persist:primary="name">
2824                         <field name="name" reporter:datatype="text"/>
2825                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2826                 </fields>
2827                 <links/>
2828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2829                         <actions>
2830                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2831                                 <retrieve/>
2832                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2833                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2834                         </actions>
2835                 </permacrud>
2836         </class>
2837         <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">
2838                 <fields oils_persist:primary="name">
2839                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2840                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2841                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2842                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2843                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2844                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2845                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2846                 </fields>
2847                 <links>
2848                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2849                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2850                 </links>
2851                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2852                         <actions>
2853                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2854                                 <retrieve/>
2855                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2856                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2857                         </actions>
2858                 </permacrud>
2859         </class>
2860         <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">
2861                 <fields oils_persist:primary="name">
2862                         <field name="name" reporter:datatype="text"/>
2863                         <field name="label" reporter:datatype="text"/>
2864                         <field name="description" reporter:datatype="text"/>
2865                         <field name="datatype" reporter:datatype="text"/>
2866                         <field name="view_perm" reporter:datatype="link"/>
2867                         <field name="update_perm" reporter:datatype="link"/>
2868                         <field name="fm_class" reporter:datatype="text"/>
2869                         <field name="grp" reporter:datatype="link"/>
2870                 </fields>
2871                 <links>
2872                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2873                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2874                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2875                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2876                 </links>
2877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2878                         <actions>
2879                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2880                                 <retrieve/>
2881                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2882                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2883                         </actions>
2884                 </permacrud>
2885         </class>
2886         <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">
2887                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2888                         <field name="id" />
2889                         <field name="name"  reporter:datatype="text"/>
2890                         <field name="org_unit" reporter:datatype="org_unit"/>
2891                         <field name="value"  reporter:datatype="text"/>
2892                 </fields>
2893                 <links>
2894                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2895                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2896                 </links>
2897         </class>
2898         <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">
2899                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2900                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2901                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2902                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2903                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2904                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2905                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2906                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2907                 </fields>
2908                 <links>
2909                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2910                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2911                 </links>
2912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2913             <actions>
2914                 <create permission="CREATE_COPY_NOTE">
2915                     <context link="owning_copy" field="circ_lib"/>
2916                 </create>
2917                 <retrieve permission="VIEW_COPY_NOTES">
2918                     <context link="owning_copy" field="circ_lib"/>
2919                 </retrieve>
2920                 <update permission="UPDATE_COPY_NOTE">
2921                     <context link="owning_copy" field="circ_lib"/>
2922                 </update>
2923                 <delete permission="DELETE_COPY_NOTE">
2924                     <context link="owning_copy" field="circ_lib"/>
2925                 </delete>
2926             </actions>
2927         </permacrud>
2928         </class>
2929         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2930                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2931                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2932                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2933                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2934                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2935                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2936                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2937                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2938                 </fields>
2939                 <links>
2940                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2941                 </links>
2942         </class>
2943         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2944                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2945                         <field name="fingerprint"  reporter:datatype="text"/>
2946                         <field name="id" reporter:datatype="id" />
2947                         <field name="master_record" reporter:datatype="link"/>
2948                         <field name="mods"  reporter:datatype="text"/>
2949                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2950                 </fields>
2951                 <links>
2952                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2953                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2954                 </links>
2955         </class>
2956         <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">
2957                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2958                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2959                         <field name="name"  reporter:datatype="text"/>
2960                 </fields>
2961                 <links/>
2962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2963             <actions>
2964                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2965                 <retrieve/>
2966                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2967                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2968             </actions>
2969         </permacrud>
2970         </class>
2971         <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">
2972                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2973                         <field name="code"  reporter:datatype="text"/>
2974                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2975                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2976                 </fields>
2977                 <links/>
2978         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2979             <actions>
2980                 <create permission="CREATE_PERM" global_required="true"/>
2981                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2982                 <update permission="UPDATE_PERM" global_required="true"/>
2983                 <delete permission="DELETE_PERM" global_required="true"/>
2984             </actions>
2985         </permacrud>
2986         </class>
2987         <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">
2988                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2989                         <field name="id" reporter:datatype="id" />
2990                         <field name="metarecord" reporter:datatype="link"/>
2991                         <field name="source" reporter:datatype="link"/>
2992                 </fields>
2993                 <links>
2994                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2995                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2996                 </links>
2997         </class>
2998         <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">
2999                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3000                         <field name="id" reporter:datatype="id" />
3001                         <field name="field" reporter:datatype="link"/>
3002                         <field name="source" reporter:datatype="link"/>
3003                         <field name="value"  reporter:datatype="text"/>
3004                 </fields>
3005                 <links>
3006                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3007                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3008                 </links>
3009         </class>
3010         <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">
3011                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3012                         <field name="id" reporter:datatype="id" />
3013                         <field name="value" reporter:datatype="text"/>
3014                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3015                 </fields>
3016                 <links>
3017                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3018                 </links>
3019         </class>
3020         <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">
3021                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3022                         <field name="id" reporter:datatype="id" />
3023                         <field name="entry" reporter:datatype="link"/>
3024                         <field name="def" reporter:datatype="link"/>
3025                         <field name="source" reporter:datatype="link"/>
3026                 </fields>
3027                 <links>
3028                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3029                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3030                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3031                 </links>
3032         </class>
3033         <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">
3034                 <oils_persist:source_definition>
3035                         SELECT * FROM metabib.author_field_entry
3036                                                 UNION ALL
3037                         SELECT * FROM metabib.keyword_field_entry
3038                                                 UNION ALL
3039                         SELECT * FROM metabib.identifier_field_entry
3040                                                 UNION ALL
3041                         SELECT * FROM metabib.title_field_entry
3042                                                 UNION ALL
3043                         SELECT * FROM metabib.subject_field_entry
3044                                                 UNION ALL
3045                         SELECT * FROM metabib.series_field_entry
3046                 </oils_persist:source_definition>
3047                 <fields>
3048                         <field name="field" reporter:datatype="link"/>
3049                         <field name="id" reporter:datatype="id" />
3050                         <field name="source" reporter:datatype="link"/>
3051                         <field name="value"  reporter:datatype="text"/>
3052                 </fields>
3053                 <links>
3054                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3055                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3056                 </links>
3057         </class>
3058         <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">
3059                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3060                         <field name="field" reporter:datatype="link"/>
3061                         <field name="id" reporter:datatype="id" />
3062                         <field name="source" reporter:datatype="link"/>
3063                         <field name="value"  reporter:datatype="text"/>
3064                 </fields>
3065                 <links>
3066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3067                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3068                 </links>
3069         </class>
3070         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3071                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3072                         <field name="accepting_usr" reporter:datatype="link"/>
3073                         <field name="amount" reporter:datatype="money" />
3074                         <field name="amount_collected" reporter:datatype="money" />
3075                         <field name="cash_drawer" reporter:datatype="link"/>
3076                         <field name="id" reporter:datatype="id" />
3077                         <field name="note"  reporter:datatype="text"/>
3078                         <field name="payment_ts" reporter:datatype="timestamp"/>
3079                         <field name="xact" reporter:datatype="link"/>
3080                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3081                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3082                 </fields>
3083                 <links>
3084                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3085                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3086                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3087                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3088                 </links>
3089         </class>
3090         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3091                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3092                         <field name="accepting_usr" reporter:datatype="link"/>
3093                         <field name="amount" reporter:datatype="money" />
3094                         <field name="amount_collected" reporter:datatype="money" />
3095                         <field name="id" reporter:datatype="id" />
3096                         <field name="note"  reporter:datatype="text"/>
3097                         <field name="payment_ts" reporter:datatype="timestamp"/>
3098                         <field name="xact" reporter:datatype="link"/>
3099                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3100                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3101                 </fields>
3102                 <links>
3103                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3104                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3105                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3106                 </links>
3107         </class>
3108         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3109                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3110                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3111                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3112                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3113                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3114                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3115                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3116                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3117                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3118                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3119                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3120                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3121                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3122                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3123                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3124                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3125                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3126                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3127                 </fields>
3128                 <links>
3129                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3130                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3131                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3132                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3133                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3134                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3135                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3136                 </links>
3137         </class>
3138
3139         <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">
3140                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3141                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3142                         <field name="name"  reporter:datatype="text"/>
3143                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3144                         <field name="block_list" reporter:datatype="text"/>
3145                         <field name="staff_alert" reporter:datatype="bool"/>
3146                         <field name="org_depth" reporter:datatype="int"/>
3147                 </fields>
3148                 <links/>
3149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3150             <actions>
3151                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3152                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3153                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3154                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3155             </actions>
3156         </permacrud>
3157         </class>
3158         <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">
3159                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3160                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3161                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3162                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3163                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3164                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3165                 </fields>
3166                 <links>
3167                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3168                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3169                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3170         </links>
3171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3172             <actions>
3173                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3174                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3175                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3176                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3177             </actions>
3178         </permacrud>
3179         </class>
3180         <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">
3181                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3182                         <field name="holdable" reporter:datatype="bool"/>
3183                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3184                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3185                         <field name="opac_visible" reporter:datatype="bool"/>
3186             <field name="copy_active" reporter:datatype="bool"/>
3187             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3188                 </fields>
3189                 <links/>
3190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3191             <actions>
3192                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3193                 <retrieve/>
3194                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3195                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3196             </actions>
3197         </permacrud>
3198         </class>
3199         <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">
3200                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3201                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3202                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3203                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3204                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3205                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3206                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3207                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3208                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3209                 </fields>
3210                 <links>
3211                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3212                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3213                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3214                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3215                 </links>
3216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3217                         <actions>
3218                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3219                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3220                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3221                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3222                         </actions>
3223                 </permacrud>
3224         </class>
3225         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3227                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3228                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3229                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3230                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3231                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3232                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3233                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3234                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3235                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3236                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3237                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3238                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3239                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3240                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3241                 </fields>
3242                 <links>
3243                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3244                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3245                 </links>
3246         </class>
3247         <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">
3248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3249                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3250                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3251                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3252                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3253                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3254                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3255                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3256                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3257                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3258                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3259                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3260                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3261                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3262                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3263                 </fields>
3264                 <links>
3265                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3266                 </links>
3267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3268                         <actions>
3269                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3270                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3271                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3272                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3273                         </actions>
3274                 </permacrud>
3275         </class>
3276
3277
3278         <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">
3279                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3280                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3281                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3282                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3283                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3284                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3285                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3286                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3287                 </fields>
3288                 <links>
3289                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3290                 </links>
3291         </class>
3292
3293         <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">
3294                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3295                         <field name="call_number" />
3296                         <field name="create_date" reporter:datatype="timestamp"/>
3297                         <field name="creator" reporter:datatype="link"/>
3298                         <field name="id" reporter:datatype="id" />
3299                         <field name="pub" reporter:datatype="bool"/>
3300                         <field name="title"  reporter:datatype="text"/>
3301                         <field name="value"  reporter:datatype="text"/>
3302                 </fields>
3303                 <links>
3304                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3305                 </links>
3306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3307             <actions>
3308                 <create permission="CREATE_VOLUME_NOTE">
3309                     <context link="call_number" field="owning_lib"/>
3310                 </create>
3311                 <retrieve permission="VIEW_VOLUME_NOTES">
3312                     <context link="call_number" field="owning_lib"/>
3313                 </retrieve>
3314                 <update permission="UPDATE_VOLUME_NOTE">
3315                     <context link="call_number" field="owning_lib"/>
3316                 </update>
3317                 <delete permission="DELETE_VOLUME_NOTE">
3318                     <context link="call_number" field="owning_lib"/>
3319                 </delete>
3320             </actions>
3321         </permacrud>
3322         </class>
3323         <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">
3324                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3325                         <field name="create_date" reporter:datatype="timestamp"/>
3326                         <field name="creator" reporter:datatype="link"/>
3327                         <field name="edit_date" reporter:datatype="timestamp"/>
3328                         <field name="editor" reporter:datatype="link"/>
3329                         <field name="id" reporter:datatype="id" />
3330                         <field name="record" reporter:datatype="link"/>
3331                         <field name="value" reporter:datatype="text"/>
3332                 </fields>
3333                 <links>
3334                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3335                 </links>
3336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3337             <actions>
3338                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3339                 <retrieve/>
3340                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3341                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3342             </actions>
3343         </permacrud>
3344         </class>
3345         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3346         <oils_persist:source_definition>
3347 SELECT  usr,
3348         SUM(
3349             CASE
3350                 WHEN (
3351                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3352                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3353                 ) THEN 1
3354                 ELSE 0
3355             END
3356         ) AS out,
3357
3358         SUM(
3359             CASE
3360                 WHEN (
3361                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3362                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3363                 ) THEN 1
3364                 ELSE 0
3365             END
3366         ) AS overdue,
3367
3368         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3369         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3370         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3371   FROM  action.circulation
3372   WHERE checkin_time IS NULL
3373   GROUP BY 1
3374         </oils_persist:source_definition>
3375         <fields oils_persist:primary="usr">
3376             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3377             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3378             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3379             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3380             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3381             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3382         </fields>
3383         <links>
3384             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3385         </links>
3386         </class>
3387         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3388         <oils_persist:source_definition>
3389 SELECT  usr,
3390         ARRAY_TO_STRING(ARRAY_ACCUM(
3391             CASE
3392                 WHEN (
3393                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3394                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3395                 ) THEN id
3396                 ELSE 0
3397             END
3398         ),',') AS out,
3399
3400         ARRAY_TO_STRING(ARRAY_ACCUM(
3401             CASE
3402                 WHEN (
3403                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3404                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3405                 ) THEN id
3406                 ELSE 0
3407             END
3408         ),',') AS overdue,
3409
3410         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3411         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3412         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3413   FROM  action.circulation
3414   WHERE checkin_time IS NULL
3415   GROUP BY 1
3416         </oils_persist:source_definition>
3417         <fields oils_persist:primary="usr">
3418             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3419             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3420             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3421             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3422             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3423             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3424         </fields>
3425         <links>
3426             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3427         </links>
3428         </class>
3429         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3430                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3431                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3432                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3433                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3434                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3435                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3436                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3437                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3438                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3439                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3440                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3441                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3442                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3443                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3444                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3445                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3446                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3447                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3448                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3449                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3450                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3451                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3452                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3453                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3454                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3455                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3456                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3457                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3458                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3459                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3460                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3461                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3462                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3463                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3464                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3465                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3466                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3467                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3468                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3469                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3470                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3471                 </fields>
3472                 <links>
3473                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3474                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3475                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3476                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3477                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3478                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3479                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3480                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3481                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3482                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3483                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3484                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3485                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3486                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3487                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3488                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3489                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3490                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3491                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3492                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3493                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3494                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3495                 </links>
3496         </class>
3497         <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">
3498                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3499                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3500                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3501                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3502                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3503                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3504                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3505                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3506                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3507                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3508                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3509                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3510                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3511                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3512                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3513                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3514                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3515                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3516                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3517                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3518                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3519                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3520                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3521                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3522                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3523                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3524                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3525                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3526                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3527                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3528                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3529                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3530                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3531                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3532                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3533                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3534                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3535                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3536                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3537                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3538                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3539                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3540                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3541                 </fields>
3542                 <links>
3543                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3544                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3545                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3546                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3547                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3548                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3549                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3550                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3551                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3552                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3553                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3554                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3555                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3556                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3557                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3558                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3559                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3560                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3561                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3562                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3563                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3564                 </links>
3565         </class>
3566         <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">
3567                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3568                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3569                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3570                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3571                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3572                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3573                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3574                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3575                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3576                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3577                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3578                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3579                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3580                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3581                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3582                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3583                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3584                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3585                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3586                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3587                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3588                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3589                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3590                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3591                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3592                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3593                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3594                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3595                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3596                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3597                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3598                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3599                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3600                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3601                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3602                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3603                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3604                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3605                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3606                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3607                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3608                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3609                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3610                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3611                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3612                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3613                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3614                 </fields>
3615                 <links>
3616                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3617                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3618                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3619                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3620                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3621                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3622                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3623                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3624                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3625                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3626                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3627                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3628                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3629                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3630                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3631                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3632                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3633                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3634                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3635                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3636                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3637                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3638                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3639                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3640                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3641                 </links>
3642         </class>
3643
3644         <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">
3645                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3646                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3647                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3648                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3649                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3650                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3651                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3652                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3653                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3654                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3655                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3656                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3657                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3658                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3659                 </fields>
3660                 <links>
3661                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3662                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3663                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3664                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3665                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3666                 </links>
3667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3668                         <actions>
3669                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3670                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3671                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3672                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3673                         </actions>
3674                 </permacrud>
3675         </class>
3676
3677         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3678                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3679                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3680                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3681                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3682                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3683                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3684                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3685                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3686                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3687                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3688                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3689                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3690                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3691                 </fields>
3692                 <links>
3693                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3694                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3695                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3696                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3697                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3698                 </links>
3699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3700                         <actions>
3701                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3702                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3703                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3704                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3705                         </actions>
3706                 </permacrud>
3707         </class>
3708         
3709         <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">
3710                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3711                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3712                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3713                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3714                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3715                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3716                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3717                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3718                 </fields>
3719                 <links>
3720                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3721                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3722                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3723                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3724                 </links>
3725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3726                         <actions>
3727                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3728                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3729                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3730                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3731                         </actions>
3732                 </permacrud>
3733         </class>
3734         
3735         <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">
3736                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3737                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3738                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3739                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3740                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3741                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3742                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3743                 </fields>
3744                 <links>
3745                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3746                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3747                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3748                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3749                 </links>
3750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3751                         <actions>
3752                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3753                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3754                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3755                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3756                         </actions>
3757                 </permacrud>
3758         </class>
3759         
3760         <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">
3761                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3762                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3763                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3764                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3765                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3766                 </fields>
3767                 <links>
3768                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3769                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3770                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3771                 </links>
3772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3773                         <actions>
3774                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3775                     <context link="resource" field="owner" />
3776                 </create>
3777                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3778                     <context link="resource" field="owner" />
3779                 </retrieve>
3780                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3781                     <context link="resource" field="owner" />
3782                 </update>
3783                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3784                     <context link="resource" field="owner" />
3785                 </delete>
3786                         </actions>
3787                 </permacrud>
3788         </class>
3789         
3790         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3791                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3792                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3793                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3794                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3795                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3796                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3797                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3798                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3799                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3800                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3801                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3802                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3803                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3804                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3805                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3806                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3807                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3808                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3809                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3810                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3811                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3812                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3813                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3814                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3815                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3816                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3817                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3818                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3819                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3820                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3821                 </fields>
3822                 <links>
3823                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3824                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3825                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3826                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3827                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3828                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3829                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3830                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3831                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3832                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3833                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3834                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3835                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3836                 </links>
3837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3838                         <actions>
3839                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3840                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3841                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3842                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3843                         </actions>
3844                 </permacrud>
3845         </class>
3846         
3847         <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">
3848                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3849                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3850                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3851                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3852                 </fields>
3853                 <links>
3854                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3855                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3856                 </links>
3857                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3858                         <actions>
3859                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3860                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3861                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3862                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3863                         </actions>
3864                 </permacrud>
3865         </class>
3866
3867         <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">
3868                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3869                         <field name="bucket" reporter:datatype="link"/>
3870                         <field name="id" reporter:datatype="id" />
3871                         <field name="target_call_number" reporter:datatype="link" />
3872                         <field name="create_time" reporter:datatype="timestamp" />
3873                         <field name="pos" reporter:datatype="int" />
3874                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3875                 </fields>
3876                 <links>
3877                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3878                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3879             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3880                 </links>
3881         </class>
3882         <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">
3883                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3884                         <field name="id" reporter:datatype="id" />
3885                         <field name="item" reporter:datatype="link"/>
3886                         <field name="note" reporter:datatype="text" />
3887                 </fields>
3888                 <links>
3889                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3890                 </links>
3891         </class>
3892         <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">
3893                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3894                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3895                         <field name="btype" reporter:datatype="text"/>
3896                         <field name="id" reporter:datatype="id" />
3897                         <field name="name" reporter:datatype="text"/>
3898                         <field name="description" reporter:datatype="text"/>
3899                         <field name="owner" reporter:datatype="link"/>
3900                         <field name="pub" reporter:datatype="bool"/>
3901                         <field name="create_time" reporter:datatype="timestamp" />
3902                 </fields>
3903                 <links>
3904                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3905                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3906                 </links>
3907         </class>
3908         <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">
3909                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3910                         <field name="id" reporter:datatype="id" />
3911                         <field name="bucket" reporter:datatype="link"/>
3912                         <field name="note" reporter:datatype="text" />
3913                 </fields>
3914                 <links>
3915                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3916                 </links>
3917         </class>
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3920                         <field name="hold" reporter:datatype="link"/>
3921                         <field name="id" reporter:datatype="id" />
3922                         <field name="target_copy" reporter:datatype="link"/>
3923                 </fields>
3924                 <links>
3925                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3926                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3927                 </links>
3928         </class>
3929         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3930                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3931                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3932                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3933                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3934                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3935                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3936                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3937                 </fields>
3938                 <links>
3939                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3940                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3941                 </links>
3942         </class>
3943         <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">
3944                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3945                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3946                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3947                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3948                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3949                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3950                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3951                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3952                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3953                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3954                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3955                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3956                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
3957                 </fields>
3958                 <links>
3959                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3960                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3961                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3962                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3963                 </links>
3964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3965             <actions>
3966                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3967                 <retrieve/>
3968                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3969                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3970             </actions>
3971         </permacrud>
3972         </class>
3973         <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">
3974                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
3975                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3976                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3977                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3978                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
3979             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3980             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
3981             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3982                 </fields>
3983                 <links>
3984                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3985                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
3986                 </links>
3987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3988             <actions>
3989                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3990                 <retrieve/>
3991                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3992                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3993             </actions>
3994         </permacrud>
3995         </class>
3996         <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">
3997                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
3998                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3999             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4000             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4001                 </fields>
4002                 <links>
4003                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4004                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4005                 </links>
4006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4007             <actions>
4008                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4009                                         <context link="lgroup" field="owner" />
4010                 </create>
4011                 <retrieve/>
4012                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4013                                         <context link="lgroup" field="owner" />
4014                 </update>
4015                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4016                                         <context link="lgroup" field="owner" />
4017                 </delete>
4018             </actions>
4019         </permacrud>
4020         </class>
4021
4022     <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">
4023         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4024             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4025             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4026             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4027             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4028         </fields>
4029         <links>
4030             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4031             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4032         </links>
4033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4034             <actions>
4035                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4036                 <retrieve/>
4037                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4038                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4039             </actions>
4040         </permacrud>
4041     </class>
4042
4043         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4044                 <fields>
4045                         <field name="sre_id" oils_persist:virtual="true" />
4046                         <field name="location" oils_persist:virtual="true" />
4047                         <field name="owning_lib" oils_persist:virtual="true" />
4048                         <field name="basic_holdings" oils_persist:virtual="true" />
4049                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4050                         <field name="supplement_holdings" oils_persist:virtual="true" />
4051                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4052                         <field name="index_holdings" oils_persist:virtual="true" />
4053                         <field name="index_holdings_add" oils_persist:virtual="true" />
4054                         <field name="online" oils_persist:virtual="true" />
4055                         <field name="missing" oils_persist:virtual="true" />
4056                         <field name="incomplete" oils_persist:virtual="true" />
4057                 </fields>
4058         </class>
4059
4060         <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">
4061                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4062                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4063                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4064                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4065                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4066                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4067                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4068                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4069                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4070                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4071                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4072                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4073                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4074                 </fields>
4075                 <links>
4076                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4077                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4078                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4079                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4080                 </links>
4081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4082                         <actions>
4083                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4084                                 <retrieve/>
4085                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4086                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4087                         </actions>
4088                 </permacrud>
4089         </class>
4090
4091         <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">
4092                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4093                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4094                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4095                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4096                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4097                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4098                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4099                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4100                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4101                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4102                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4103                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4104                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4105                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4106                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4107                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4108                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4109                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4110                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4111                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4112                 </fields>
4113                 <links>
4114                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4115                 </links>
4116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4117                         <actions>
4118                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4119                                         <context link="subscription" field="owning_lib" />
4120                                 </create>
4121                                 <retrieve />
4122                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4123                                         <context link="subscription" field="owning_lib" />
4124                                 </update>
4125                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4126                                         <context link="subscription" field="owning_lib" />
4127                                 </delete>
4128                         </actions>
4129                 </permacrud>
4130         </class>
4131
4132         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4133                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4134                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4135                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4136                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4137                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4138                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4139                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4140                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4141                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4142                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4143                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4144                 </fields>
4145                 <links>
4146                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4147                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4148                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4149                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4150                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4151                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4152                 </links>
4153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4154                         <actions>
4155                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4156                                 <retrieve />
4157                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4158                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4159                         </actions>
4160                 </permacrud>
4161         </class>
4162
4163         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4164                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4165                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4166                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4167                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4168                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4169                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4170                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4171                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4172                 </fields>
4173                 <links>
4174                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4175                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4176                 </links>
4177         </class>
4178
4179         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4180                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4181                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4182                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4183                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4184                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4185                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4186                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4187                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4188                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4189                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4190                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4191                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4192                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4193                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4194                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4195                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4196                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4197                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4198                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4199                 </fields>
4200                 <links>
4201                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4202                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4203                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4204                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4205                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4206                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4207                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4208                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4209                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4210                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4211                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4212                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4213                 </links>
4214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4215                         <actions>
4216                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4217                                 <retrieve />
4218                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4219                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4220                         </actions>
4221                 </permacrud>
4222         </class>
4223
4224         <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">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4226                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4227                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4228                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4229                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4230                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4231                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4232                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4233                 </fields>
4234                 <links>
4235                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4236                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4237                 </links>
4238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4239                         <actions>
4240                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4241                                         <context link="distribution" field="holding_lib" />
4242                                 </create>
4243                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4244                                         <context link="distribution" field="holding_lib" />
4245                                 </retrieve>
4246                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4247                                         <context link="distribution" field="holding_lib" />
4248                                 </update>
4249                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4250                                         <context link="distribution" field="holding_lib" />
4251                                 </delete>
4252                         </actions>
4253                 </permacrud>
4254         </class>
4255
4256         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4257                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4258                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4259                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4260                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4261                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4262                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4263                 </fields>
4264                 <links>
4265                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4266                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4267                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4268                 </links>
4269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4270                         <actions>
4271                                 <create permission="ADMIN_SERIAL_STREAM">
4272                                         <context link="distribution" field="holding_lib" />
4273                                 </create>
4274                                 <retrieve />
4275                                 <update permission="ADMIN_SERIAL_STREAM">
4276                                         <context link="distribution" field="holding_lib" />
4277                                 </update>
4278                                 <delete permission="ADMIN_SERIAL_STREAM">
4279                                         <context link="distribution" field="holding_lib" />
4280                                 </delete>
4281                         </actions>
4282                 </permacrud>
4283         </class>
4284
4285         <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">
4286                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4287                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4288                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4289                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4290                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4291                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4292                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4293                 </fields>
4294                 <links>
4295                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4296                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4297                 </links>
4298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4299                         <actions>
4300                                 <create permission="ADMIN_SERIAL_STREAM">
4301                                         <context link="stream" jump="distribution" field="holding_lib" />
4302                                 </create>
4303                                 <retrieve permission="RECEIVE_SERIAL">
4304                                         <context link="stream" jump="distribution" field="holding_lib" />
4305                                 </retrieve>
4306                                 <update permission="ADMIN_SERIAL_STREAM">
4307                                         <context link="stream" jump="distribution" field="holding_lib" />
4308                                 </update>
4309                                 <delete permission="ADMIN_SERIAL_STREAM">
4310                                         <context link="stream" jump="distribution" field="holding_lib" />
4311                                 </delete>
4312                         </actions>
4313                 </permacrud>
4314         </class>
4315
4316         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4317                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4318                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4319                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4320                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4321                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4322                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4323                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4324                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4325                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4326                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4327                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4328                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4329                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4330                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4331                 </fields>
4332                 <links>
4333                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4334                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4335                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4336                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4337                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4338                 </links>
4339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4340                         <actions>
4341                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4342                                         <context link="subscription" field="owning_lib" />
4343                                 </create>
4344                                 <retrieve/>
4345                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4346                                         <context link="subscription" field="owning_lib" />
4347                                 </update>
4348                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4349                                         <context link="subscription" field="owning_lib" />
4350                                 </delete>
4351                         </actions>
4352                 </permacrud>
4353         </class>
4354
4355         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4356                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4357                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4358                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4359                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4360                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4361                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4362                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4363                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4364                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4365                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4366                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4367                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4368                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4369                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4370                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4371                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4372                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4373                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4374                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4375                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4376                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4377                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4378                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4379                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4380                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4381                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4382                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4383                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4384                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4385                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4386                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4387                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4388                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4389                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4390                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4391                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4392                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4393                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4394                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4395                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4396                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4397                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4398                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4399                 </fields>
4400                 <links>
4401                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4402                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4403                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4404                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4405                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4406                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4407                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4408                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4409                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4410                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4411                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4412                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4413                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4414                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4415                 </links>
4416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4417                         <actions>
4418                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4419                                 <retrieve/>
4420                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4421                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4422                         </actions>
4423                 </permacrud>
4424         </class>
4425
4426         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4427                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4428                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4429                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4430                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4431                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4432                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4433                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4434                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4435                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4436                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4437                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4438                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4439                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4440                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4441                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4442                 </fields>
4443                 <links>
4444                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4445                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4446                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4447                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4448                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4449                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4450                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4451                 </links>
4452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4453                         <actions>
4454                                 <create permission="ADMIN_SERIAL_ITEM">
4455                                         <context link="stream" jump="distribution" field="holding_lib" />
4456                                 </create>
4457                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4458                                         <context link="stream" jump="distribution" field="holding_lib" />
4459                                 </retrieve>
4460                                 <update permission="ADMIN_SERIAL_ITEM">
4461                                         <context link="stream" jump="distribution" field="holding_lib" />
4462                                 </update>
4463                                 <delete permission="ADMIN_SERIAL_ITEM">
4464                                         <context link="stream" jump="distribution" field="holding_lib" />
4465                                 </delete>
4466                         </actions>
4467                 </permacrud>
4468         </class>
4469
4470         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4471                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4472                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4473                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4474                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4475                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4476                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4477                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4478                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4479                 </fields>
4480                 <links>
4481                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4482                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4483                 </links>
4484                 <!-- Not available via PCRUD at this time -->
4485         </class>
4486         <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">
4487                 <fields>
4488                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4489                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4490                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4491                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4492                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4493                 </fields>
4494                 <links>
4495                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4496                 </links>
4497         </class>
4498         <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">
4499                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4500                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4501                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4502                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4503                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4504                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4505                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4506                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4507                 </fields>
4508                 <links>
4509                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4510                 </links>
4511         </class>
4512         <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">
4513                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4514                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4515                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4516                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4517                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4518                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4519                 </fields>
4520                 <links>
4521                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4522                 </links>
4523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4524                         <actions>
4525                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4526                                         <context link="distribution" field="holding_lib" />
4527                                 </create>
4528                                 <retrieve/>
4529                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4530                                         <context link="distribution" field="holding_lib" />
4531                                 </update>
4532                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4533                                         <context link="distribution" field="holding_lib" />
4534                                 </delete>
4535                         </actions>
4536                 </permacrud>
4537         </class>
4538
4539         <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">
4540                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4541                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4542                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4543                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4544                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4545                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4546                 </fields>
4547                 <links>
4548                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4549                 </links>
4550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4551                         <actions>
4552                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4553                                         <context link="distribution" field="holding_lib" />
4554                                 </create>
4555                                 <retrieve/>
4556                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4557                                         <context link="distribution" field="holding_lib" />
4558                                 </update>
4559                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4560                                         <context link="distribution" field="holding_lib" />
4561                                 </delete>
4562                         </actions>
4563                 </permacrud>
4564         </class>
4565
4566         <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">
4567                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4568                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4569                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4570                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4571                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4572                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4573                 </fields>
4574                 <links>
4575                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4576                 </links>
4577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4578                         <actions>
4579                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4580                                         <context link="distribution" field="holding_lib" />
4581                                 </create>
4582                                 <retrieve/>
4583                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4584                                         <context link="distribution" field="holding_lib" />
4585                                 </update>
4586                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4587                                         <context link="distribution" field="holding_lib" />
4588                                 </delete>
4589                         </actions>
4590                 </permacrud>
4591         </class>
4592
4593         <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">
4594                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4595                         <field name="id" reporter:datatype="id" />
4596                         <field name="owning_copy" reporter:datatype="link"/>
4597                         <field name="stat_cat" reporter:datatype="link"/>
4598                         <field name="stat_cat_entry" reporter:datatype="link"/>
4599                 </fields>
4600                 <links>
4601                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4602                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4603                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4604                 </links>
4605         </class>
4606         <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">
4607                 <fields oils_persist:primary="code">
4608                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4609                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4610                 </fields>
4611                 <links/>
4612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4613             <actions>
4614                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4615                 <retrieve/>
4616                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4617                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4618             </actions>
4619         </permacrud>
4620         </class>
4621         <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">
4622                 <fields oils_persist:primary="code">
4623                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4624                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4625                 </fields>
4626                 <links/>
4627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4628             <actions>
4629                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4630                 <retrieve/>
4631                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4632                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4633             </actions>
4634         </permacrud>
4635         </class>
4636         <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">
4637                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4638                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4639                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4640                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4641                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4642                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4643                 </fields>
4644                 <links>
4645             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4646         </links>
4647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4648             <actions>
4649                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4650                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4651                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4652                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4653             </actions>
4654         </permacrud>
4655         </class>
4656         <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">
4657                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4658                         <field name="id" reporter:datatype="id" />
4659                         <field name="name" reporter:datatype="text"/>
4660                 </fields>
4661                 <links/>
4662         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4663             <actions>
4664                 <create permission="CREATE_LASSO" global_required="true"/>
4665                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4666                 <update permission="UPDATE_LASSO" global_required="true"/>
4667                 <delete permission="DELETE_LASSO" global_required="true"/>
4668             </actions>
4669         </permacrud>
4670         </class>
4671         <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">
4672                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4673                         <field name="id" reporter:datatype="id" />
4674                         <field name="lasso" reporter:datatype="link"/>
4675                         <field name="org_unit" reporter:datatype="org_unit"/>
4676                 </fields>
4677                 <links>
4678                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4679                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4680                 </links>
4681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4682             <actions>
4683                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4684                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4685                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4686                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4687             </actions>
4688         </permacrud>
4689         </class>
4690         <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">
4691                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4692                         <field name="id" reporter:datatype="id" />
4693                         <field name="from_org" reporter:datatype="org_unit"/>
4694                         <field name="to_org" reporter:datatype="org_unit"/>
4695                         <field name="prox" reporter:datatype="int" />
4696                 </fields>
4697                 <links>
4698                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4699                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4700                 </links>
4701         </class>
4702         <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">
4703                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4704                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4705                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4706                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4707                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4708                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4709                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4710                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4711                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4712                 </fields>
4713                 <links/>
4714         </class>
4715         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4716                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4717                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4718                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4719                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4720                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4721                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4722                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4723                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4724                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4725                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4726                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4727                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4728                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4729                 </fields>
4730                 <links>
4731                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4732                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4733                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4734                 </links>
4735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4736             <actions>
4737                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4738                 <retrieve/>
4739                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4740                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4741             </actions>
4742         </permacrud>
4743         </class>
4744         <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">
4745                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4746                         <field name="address_type"  reporter:datatype="text"/>
4747                         <field name="city"  reporter:datatype="text"/>
4748                         <field name="country"  reporter:datatype="text"/>
4749                         <field name="county"  reporter:datatype="text"/>
4750                         <field name="id" reporter:datatype="id" />
4751                         <field name="org_unit" reporter:datatype="org_unit"/>
4752                         <field name="post_code"  reporter:datatype="text"/>
4753                         <field name="state"  reporter:datatype="text"/>
4754                         <field name="street1"  reporter:datatype="text"/>
4755                         <field name="street2"  reporter:datatype="text"/>
4756                         <field name="valid" reporter:datatype="bool"/>
4757                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4758                 </fields>
4759                 <links>
4760                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4761                 </links>
4762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4763             <actions>
4764                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4765                 <retrieve/>
4766                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4767                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4768             </actions>
4769         </permacrud>
4770         </class>
4771         <!-- A note: Please update alhr when updating ahr -->
4772         <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">
4773                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4774                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4775                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4776                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4777                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4778                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4779                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4780                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4781                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4782                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4783                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4784                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4785                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4786                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4787                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4788                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="text"/>
4789                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4790                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4791                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4792                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4793                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4794                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4795                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4796                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4797                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4798                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4799                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4800                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4801                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4802                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4803                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4804                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4805                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4806                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4807                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4808                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4809                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4810                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4811                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4812                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4813                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4814                 </fields>
4815                 <links>
4816                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4817                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4818                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4819                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4820                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4821                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4822                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4823                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4824                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4825                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4826                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4827                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4828                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4829                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4830                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4831                         <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
4832                 </links>
4833         </class>
4834         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4835                 <oils_persist:source_definition>
4836                         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)
4837                 </oils_persist:source_definition>
4838                 <fields oils_persist:primary="id">
4839                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4840                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4841                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4842                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4843                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4844                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4845                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4846                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4847                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4848                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4849                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4850                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4851                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4852                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4853                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4854                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4855                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4856                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4857                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4858                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4859                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4860                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4861                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4862                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4863                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4864                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4865                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4866                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4867                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4868                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4869                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4870                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4871                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4872                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4873                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4874                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4875                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4876                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4877                 </fields>
4878                 <links>
4879                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4880                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4881                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4882                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4883                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4884                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4885                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4886                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4887                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4888                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4889                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4890                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4891                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4892                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4893                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4894                 </links>
4895         </class>
4896
4897         <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">
4898                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4899                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4900                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4901                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4902                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4903                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4904                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4905                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4906                 </fields>
4907                 <links>
4908                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4909                 </links>
4910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4911                         <actions>
4912                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4913                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4914                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4915                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4916                         </actions>
4917                 </permacrud>
4918         </class>
4919         <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">
4920                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4921                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4922                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4923                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4924                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4925                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4926                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4927                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4928                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4929                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4930                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4931                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4932                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4933                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4934                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4935                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4936                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4937                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4938                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4939                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4940                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4941                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4942                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4943                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4945                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4946                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4947                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4948                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4949                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4950                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4951                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4952                 </fields>
4953                 <links>
4954                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4955                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4956                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4957                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4958                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4959                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4960                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4961                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4962                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4963                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4964                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4965                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4966                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4967                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4968                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4969                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4970                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4971                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4972                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4973                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4974                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4975                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4976                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4977                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4978                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4979                 </links>
4980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4981             <actions>
4982                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4983                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4984                     <context field="id"/>
4985                     <context field="parent_ou"/>
4986                                 </retrieve>
4987                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4988                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4989             </actions>
4990         </permacrud>
4991         </class>
4992         <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">
4993                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
4994                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4995                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4996                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
4997                 </fields>
4998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4999                         <actions>
5000                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5001                                 <retrieve/>
5002                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5003                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5004                         </actions>
5005                 </permacrud>
5006         </class>
5007         <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">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5009                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5010                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5011                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5012                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5013                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5014                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5015                 </fields>
5016                 <links>
5017                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5018                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5019                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5020                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5021                 </links>
5022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5023                         <actions>
5024                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5025                                 <retrieve/>
5026                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5027                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5028                         </actions>
5029                 </permacrud>
5030         </class>
5031         <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">
5032                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5033                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5034                         <field name="btype" reporter:datatype="text"/>
5035                         <field name="id" reporter:datatype="id" />
5036                         <field name="name"  reporter:datatype="text"/>
5037                         <field name="description" reporter:datatype="text"/>
5038                         <field name="owner" reporter:datatype="link"/>
5039                         <field name="pub" reporter:datatype="bool"/>
5040                         <field name="create_time" reporter:datatype="timestamp" />
5041                 </fields>
5042                 <links>
5043                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5044                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5045                 </links>
5046         </class>
5047         <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">
5048                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5049                         <field name="id" reporter:datatype="id" />
5050                         <field name="bucket" reporter:datatype="link"/>
5051                         <field name="note" reporter:datatype="text" />
5052                 </fields>
5053                 <links>
5054                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5055                 </links>
5056         </class>
5057         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5058                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5059                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5060                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5061                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5062                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5063                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5064                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5065                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5066                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5067                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5068                 </fields>
5069                 <links>
5070                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5071                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5072                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5073                 </links>
5074         </class>
5075         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5076                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5077                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5078                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5079                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5080                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5081                 </fields>
5082                 <links>
5083                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5084                 </links>
5085         </class>
5086     <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">
5087         <fields oils_persist:primary="field">
5088             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5089             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5090             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5091         </fields>
5092         <links/>
5093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5094             <actions>
5095                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5096                 <retrieve />
5097                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5098                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5099             </actions>
5100         </permacrud>
5101     </class>
5102         <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">
5103                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5104                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5105                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5106                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5107                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5108                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5109                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5110                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5111                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5112                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5113                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5114                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5115                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5116                 </fields>
5117                 <links>
5118                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5119                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5120                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5121                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5122                 </links>
5123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5124             <actions>
5125                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5126                 <retrieve />
5127                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5128                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5129             </actions>
5130         </permacrud>
5131         </class>
5132         <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">
5133                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5134                         <field name="field" reporter:datatype="link"/>
5135                         <field name="id" reporter:datatype="id" />
5136                         <field name="source" reporter:datatype="link"/>
5137                         <field name="value"  reporter:datatype="text"/>
5138                 </fields>
5139                 <links>
5140                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5141                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5142                 </links>
5143         </class>
5144         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5145                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5146                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5147                         <field name="btype" reporter:datatype="text"/>
5148                         <field name="id" reporter:datatype="id" />
5149                         <field name="name"  reporter:datatype="text"/>
5150                         <field name="description" reporter:datatype="text"/>
5151                         <field name="owner" reporter:datatype="link"/>
5152                         <field name="pub" reporter:datatype="bool"/>
5153                         <field name="create_time" reporter:datatype="timestamp" />
5154                 </fields>
5155                 <links>
5156                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5157                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5158                 </links>
5159         </class>
5160         <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">
5161                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5162                         <field name="id" reporter:datatype="id" />
5163                         <field name="bucket" reporter:datatype="link"/>
5164                         <field name="note" reporter:datatype="text" />
5165                 </fields>
5166                 <links>
5167                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5168                 </links>
5169         </class>
5170         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5171                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5172                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5173                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5174                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5175                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5176                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5177                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5178                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5179                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5180                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5181                 </fields>
5182                 <links>
5183                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5184                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5185                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5186                 </links>
5187         </class>
5188         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5189                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5190                         <field name="id" reporter:datatype="id" />
5191                         <field name="ind1" />
5192                         <field name="ind2" />
5193                         <field name="record" />
5194                         <field name="subfield" />
5195                         <field name="tag" />
5196                         <field name="value" />
5197                 </fields>
5198                 <links>
5199                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5200                 </links>
5201         </class>
5202         <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">
5203                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5204                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5205                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5206                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5207                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5208                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5209                 </fields>
5210                 <links>
5211                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5212                 </links>
5213         </class>
5214         <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">
5215                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5216                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5217                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5218                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5219                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5220                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5221                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5222                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5223                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5224                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5225                 </fields>
5226                 <links>
5227                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5228                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5229                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5230                 </links>
5231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5232             <actions>
5233                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5234                 <retrieve/>
5235                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5236                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5237             </actions>
5238         </permacrud>
5239         </class>
5240         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5241                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5242                         <field name="create_date" reporter:datatype="timestamp"/>
5243                         <field name="creator" reporter:datatype="link"/>
5244                         <field name="edit_date" reporter:datatype="timestamp"/>
5245                         <field name="editor" reporter:datatype="link"/>
5246                         <field name="id" reporter:datatype="id" />
5247                         <field name="pub" reporter:datatype="bool"/>
5248                         <field name="record" reporter:datatype="link"/>
5249                         <field name="value"  reporter:datatype="text"/>
5250                 </fields>
5251                 <links>
5252                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5253                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5254                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5255                 </links>
5256         </class>
5257         <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">
5258                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5259                         <field name="balance_owed" reporter:datatype="money" />
5260                         <field name="total_owed" reporter:datatype="money" />
5261                         <field name="total_paid" reporter:datatype="money" />
5262                         <field name="usr" reporter:datatype="link"/>
5263                 </fields>
5264                 <links>
5265                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5266                 </links>
5267         </class>
5268         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5269                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5270                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5271                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5272                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5273                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5274                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5275                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5276                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5277                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5278                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5279                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5280                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5281                 </fields>
5282                 <links>
5283                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5284                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5285                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5286                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5287                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5288                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5289                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5290                 </links>
5291         </class>
5292         <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">
5293                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5294                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5295                         <field name="quality" reporter:datatype="int" />
5296                         <field name="source" reporter:datatype="text"/>
5297                         <field name="transcendant" reporter:datatype="bool"/>
5298                         <field name="can_have_copies" reporter:datatype="bool"/>
5299                 </fields>
5300                 <links/>
5301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5302             <actions>
5303                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5304                 <retrieve/>
5305                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5306                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5307             </actions>
5308         </permacrud>
5309         </class>
5310         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5311                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5312                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5313                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5314                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5315                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5316                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5317                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5319                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5320                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5321                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5322                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5323                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5324                 </fields>
5325                 <links>
5326                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5327                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5328                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5329                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5330                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5331                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5332                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5333                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5334                 </links>
5335         </class>
5336         <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">
5337                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5338                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5339                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5340                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5341                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5342                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5343                 </fields>
5344                 <links>
5345                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5346                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5347                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5348                 </links>
5349         </class>
5350         <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">
5351                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5352                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5353                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5354                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5355                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5356                 </fields>
5357                 <links>
5358                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5359                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5360                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5361                 </links>
5362         </class>
5363         <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">
5364                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5365                         <field name="bucket" reporter:datatype="link"/>
5366                         <field name="id" reporter:datatype="id" />
5367                         <field name="target_user" reporter:datatype="link"/>
5368                         <field name="create_time" reporter:datatype="timestamp" />
5369                         <field name="pos" reporter:datatype="int" />
5370                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5371                 </fields>
5372                 <links>
5373                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5374                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5375             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5376                 </links>
5377         </class>
5378         <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">
5379                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5380                         <field name="id" reporter:datatype="id" />
5381                         <field name="item" reporter:datatype="link"/>
5382                         <field name="note" reporter:datatype="text" />
5383                 </fields>
5384                 <links>
5385                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5386                 </links>
5387         </class>
5388         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5389                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5390                         <field name="balance_owed" reporter:datatype="money" />
5391                         <field name="total_owed" reporter:datatype="money" />
5392                         <field name="total_paid" reporter:datatype="money" />
5393                         <field name="usr" reporter:datatype="link"/>
5394                 </fields>
5395                 <links>
5396                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5397                 </links>
5398         </class>
5399         <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">
5400                 <fields oils_persist:primary="code" oils_persist:sequence="">
5401                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5402                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5403                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5404                 </fields>
5405                 <links/>
5406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5407             <actions>
5408                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5409                 <retrieve/>
5410                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5411                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5412             </actions>
5413         </permacrud>
5414         </class>
5415         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5416                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5417                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5418                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5419                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5420                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5421                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5422                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5423                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5424                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5425                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5426                 </fields>
5427                 <links>
5428                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5429                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5430                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5431                 </links>
5432         </class>
5433         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5434                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5435                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5436                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5437                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5438                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5439                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5440                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5441                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5442                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5443                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5444                 </fields>
5445                 <links>
5446                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5447                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5448                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5449                 </links>
5450         </class>
5451         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5452                 <fields oils_persist:primary="id" oils_persist:sequence="">
5453                         <field name="checkin_lib" reporter:datatype="link"/>
5454                         <field name="checkin_staff" reporter:datatype="link"/>
5455                         <field name="checkin_time" reporter:datatype="timestamp"/>
5456                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5457                         <field name="circ_staff" reporter:datatype="link"/>
5458                         <field name="desk_renewal" reporter:datatype="bool"/>
5459                         <field name="due_date" reporter:datatype="timestamp"/>
5460                         <field name="duration" reporter:datatype="interval"/>
5461                         <field name="duration_rule" reporter:datatype="link"/>
5462                         <field name="fine_interval" reporter:datatype="interval"/>
5463                         <field name="id" reporter:datatype="id" />
5464                         <field name="max_fine" reporter:datatype="money" />
5465                         <field name="max_fine_rule" reporter:datatype="link"/>
5466                         <field name="opac_renewal" reporter:datatype="bool"/>
5467                         <field name="phone_renewal" reporter:datatype="bool"/>
5468                         <field name="recurring_fine" reporter:datatype="money" />
5469                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5470                         <field name="renewal_remaining" reporter:datatype="int" />
5471             <field name="grace_period" reporter:datatype="interval" />
5472                         <field name="stop_fines" reporter:datatype="text"/>
5473                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5474                         <field name="target_copy" reporter:datatype="link"/>
5475                         <field name="usr" reporter:datatype="link"/>
5476                         <field name="xact_finish" reporter:datatype="timestamp" />
5477                         <field name="xact_start" reporter:datatype="timestamp" />
5478                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5479                 </fields>
5480                 <links>
5481                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5482                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5483                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5484                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5485                 </links>
5486         </class>
5487         <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">
5488                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5489                         <field name="field" reporter:datatype="link"/>
5490                         <field name="id" reporter:datatype="id" />
5491                         <field name="source" reporter:datatype="link"/>
5492                         <field name="value" reporter:datatype="text"/>
5493                 </fields>
5494                 <links>
5495                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5496                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5497                 </links>
5498         </class>
5499         <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">
5500                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5501                         <field name="high" reporter:datatype="money" />
5502                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5503                         <field name="low" reporter:datatype="money" />
5504                         <field name="name" reporter:datatype="text"/>
5505                         <field name="normal" reporter:datatype="money" />
5506                         <field name="recurrence_interval" reporter:datatype="interval"/>
5507             <field name="grace_period" reporter:datatype="interval" />
5508                 </fields>
5509                 <links/>
5510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5511             <actions>
5512                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5513                 <retrieve/>
5514                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5515                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5516             </actions>
5517         </permacrud>
5518         </class>
5519         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5520                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5521                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5522                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5523                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5524                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5525                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5526                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5527                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5528                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5529                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5530                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5531                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5532                 </fields>
5533                 <links>
5534                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5535                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5536                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5537                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5538                 </links>
5539         </class>
5540         <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">
5541                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5542                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5543                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5544                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5545                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5546                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5547                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5548                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5549                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5550                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5551                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5552                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5553                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5554                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5555                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5556                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5557                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5558                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5559                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5560                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5561                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5562                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5563                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5564                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5565                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5566                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5567                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5568                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5569                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5570                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5571                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5572                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5573                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5574                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5575                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5576                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5577                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5578                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5579                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5580                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5581                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5582                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5583                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5584                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5585                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5586                 </fields>
5587                 <links>
5588                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5589                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5590                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5591                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5592                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5593                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5594                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5595                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5596                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5597                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5598                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5599                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5600                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5601                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5602                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5603                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5604                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5605                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5606                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5607                 </links>
5608         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5609             <actions>
5610                 <create permission="CREATE_COPY">
5611                     <context link="call_number" field="owning_lib"/>
5612                 </create>
5613                 <retrieve/>
5614                 <update permission="UPDATE_COPY">
5615                     <context link="call_number" field="owning_lib"/>
5616                 </update>
5617                 <delete permission="DELETE_COPY">
5618                     <context link="call_number" field="owning_lib"/>
5619                 </delete>
5620             </actions>
5621         </permacrud>
5622         </class>
5623
5624         <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">
5625                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5626                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5627                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5628                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5629                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5630                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5631                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5632                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5633                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5634                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5635                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5636                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5637                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5638                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5639                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5640                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5641                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5642                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5643                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5644                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5645                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5646                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5647                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5648                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5649                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5650                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5651                 </fields>
5652                 <links>
5653                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5654                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5655                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5656                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5657                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5658                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5659                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5660                 </links>
5661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5662                         <actions>
5663                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5664                                 <retrieve />
5665                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5666                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5667                         </actions>
5668                 </permacrud>
5669         </class>
5670
5671         <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">
5672                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5673                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5674                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5675                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5676                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5677                 </fields>
5678                 <links/>
5679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5680             <actions>
5681                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5682                 <retrieve/>
5683                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5684                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5685             </actions>
5686         </permacrud>
5687         </class>
5688         <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">
5689                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5690                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5691                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5692                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5693                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5694                 </fields>
5695                 <links/>
5696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5697             <actions>
5698                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5699                 <retrieve/>
5700                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5701                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5702             </actions>
5703         </permacrud>
5704         </class>
5705         <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">
5706                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5707                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5708                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5709                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5710                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5711                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5712                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5713                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5714                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5715                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5716                 </fields>
5717                 <links>
5718                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5719                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5720                 </links>
5721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5722             <actions>
5723                 <create permission="CREATE_PERM" global_required="true"/>
5724                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5725                 <update permission="UPDATE_PERM" global_required="true"/>
5726                 <delete permission="DELETE_PERM" global_required="true"/>
5727             </actions>
5728         </permacrud>
5729         </class>
5730         <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">
5731                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5732                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5733                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5734                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5735                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5736                 </fields>
5737                 <links>
5738                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5739                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5740                 </links>
5741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5742             <actions>
5743                 <create permission="ADMIN_SURVEY">
5744                     <context link="question" jump="survey" field="owner"/>
5745                 </create>
5746                 <retrieve/>
5747                 <update permission="ADMIN_SURVEY">
5748                     <context link="question" jump="survey" field="owner"/>
5749                 </update>
5750                 <delete permission="ADMIN_SURVEY">
5751                     <context link="question" jump="survey" field="owner"/>
5752                 </delete>
5753             </actions>
5754         </permacrud>
5755         </class>
5756         <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">
5757                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5758                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5759                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5760                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5761                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5762                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5763                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5764                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5765                 </fields>
5766                 <links>
5767                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5768                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5769                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5770                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5771                 </links>
5772         </class>
5773         <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">
5774                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5775                         <field name="balance_owed" reporter:datatype="money" />
5776                         <field name="total_owed" reporter:datatype="money" />
5777                         <field name="total_paid" reporter:datatype="money" />
5778                         <field name="usr" reporter:datatype="link"/>
5779                 </fields>
5780                 <links>
5781                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5782                 </links>
5783         </class>
5784         <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">
5785                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5786                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5787                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5788                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5789                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5790                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5791                 </fields>
5792                 <links>
5793                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5794                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5795                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5796                 </links>
5797         </class>
5798         <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">
5799                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5800                         <field name="field" reporter:datatype="link"/>
5801                         <field name="id" reporter:datatype="id" />
5802                         <field name="source" reporter:datatype="link"/>
5803                         <field name="value" reporter:datatype="text"/>
5804                 </fields>
5805                 <links>
5806                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5807                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5808                 </links>
5809         </class>
5810         <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">
5811                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5812                         <field name="field" reporter:datatype="link"/>
5813                         <field name="id" reporter:datatype="id" />
5814                         <field name="source" reporter:datatype="link"/>
5815                         <field name="value" reporter:datatype="text"/>
5816                 </fields>
5817                 <links>
5818                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5819                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5820                 </links>
5821         </class>
5822         <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">
5823                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5824                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5825                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5826                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5827                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5828                 </fields>
5829                 <links>
5830                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5831                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5832                 </links>
5833         </class>
5834         <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">
5835                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5836                         <field name="depth" reporter:datatype="int" />
5837                         <field name="grantable" reporter:datatype="bool"/>
5838                         <field name="grp" reporter:datatype="link"/>
5839                         <field name="id" reporter:datatype="id" />
5840                         <field name="perm" reporter:datatype="link"/>
5841                 </fields>
5842                 <links>
5843                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5844                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5845                 </links>
5846         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5847             <actions>
5848                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5849                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5850                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5851                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5852             </actions>
5853         </permacrud>
5854         </class>
5855         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5856                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5857                         <field name="items" oils_persist:virtual="true" />
5858                         <field name="btype" reporter:datatype="text"/>
5859                         <field name="id" reporter:datatype="id" />
5860                         <field name="name" reporter:datatype="text"/>
5861                         <field name="description" reporter:datatype="text"/>
5862                         <field name="owner" reporter:datatype="link"/>
5863                         <field name="pub" reporter:datatype="bool"/>
5864                         <field name="create_time" reporter:datatype="timestamp" />
5865                 </fields>
5866                 <links>
5867                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5868                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5869                 </links>
5870         </class>
5871         <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">
5872                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5873                         <field name="id" reporter:datatype="id" />
5874                         <field name="bucket" reporter:datatype="link"/>
5875                         <field name="note" reporter:datatype="text" />
5876                 </fields>
5877                 <links>
5878                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5879                 </links>
5880         </class>
5881         <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">
5882                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5883                         <field name="id" reporter:datatype="int" />
5884                         <field name="usr" reporter:datatype="link"/>
5885                         <field name="work_ou" reporter:datatype="link"/>
5886                 </fields>
5887                 <links>
5888                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5889                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5890                 </links>
5891         </class>
5892         <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">
5893                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5894                         <field name="depth" reporter:datatype="int"/>
5895                         <field name="grantable" reporter:datatype="bool"/>
5896                         <field name="id" reporter:datatype="id" />
5897                         <field name="perm" reporter:datatype="link"/>
5898                         <field name="usr" reporter:datatype="link"/>
5899                 </fields>
5900                 <links>
5901                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5902                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5903                 </links>
5904         </class>
5905         <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">
5906                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5907                         <field name="object_id" reporter:datatype="text"/>
5908                         <field name="grantable" reporter:datatype="bool"/>
5909                         <field name="id" reporter:datatype="id" />
5910                         <field name="perm" reporter:datatype="link"/>
5911                         <field name="usr" reporter:datatype="link"/>
5912                         <field name="object_type" reporter:datatype="text"/>
5913                 </fields>
5914                 <links>
5915                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5916                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5917                 </links>
5918         </class>
5919         <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">
5920                 <fields oils_persist:primary="id" oils_persist:sequence="">
5921                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5922                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5923                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5924                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5925                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5926                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5927                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5928                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5929                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5930                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5931                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5932                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5933                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5934                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5935                 </fields>
5936                 <links>
5937                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5938                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5939                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5940                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5941                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5942                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5943                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5944                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5945                 </links>
5946         </class>
5947         <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">
5948                 <fields oils_persist:primary="id" oils_persist:sequence="">
5949                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5950                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5951                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5952                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5953                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5954                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5955                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
5956                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5957                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5958                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5959                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5960                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5961                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5962                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5963                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5964                 </fields>
5965                 <links>
5966                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5967                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5968                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5969                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5970                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5971                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5972                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5973                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5974                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5975                 </links>
5976         </class>
5977         <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">
5978                 <fields oils_persist:primary="id" oils_persist:sequence="">
5979                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5980                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5981                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5982                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5983                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5984                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5985                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5986                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5987                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5988                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5989                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5990                 </fields>
5991                 <links>
5992                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5993                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5994                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5995                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5996                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5997                 </links>
5998         </class>
5999         <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">
6000                 <fields oils_persist:primary="id" oils_persist:sequence="">
6001                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6002                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6003                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6004                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6005                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6006                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6007                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6008                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6009                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6010                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6011                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6012                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6013                 </fields>
6014                 <links>
6015                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6016                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6017                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6018                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6019                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6020                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6021                 </links>
6022         </class>
6023         <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">
6024                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6025                         <field name="bucket" reporter:datatype="link"/>
6026                         <field name="id" reporter:datatype="id" />
6027                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6028                         <field name="create_time" reporter:datatype="timestamp" />
6029                         <field name="pos" reporter:datatype="int" />
6030                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6031                 </fields>
6032                 <links>
6033                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6034                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6035             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6036                 </links>
6037         </class>
6038         <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">
6039                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6040                         <field name="id" reporter:datatype="id" />
6041                         <field name="item" reporter:datatype="link"/>
6042                         <field name="note" reporter:datatype="text" />
6043                 </fields>
6044                 <links>
6045                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6046                 </links>
6047         </class>
6048         <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">
6049                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6050                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6051                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6052                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6053                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6054                 </fields>
6055                 <links>
6056                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6057                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6058                 </links>
6059         </class>
6060     <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">
6061         <fields oils_persist:primary="field">
6062             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6063             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6064             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6065         </fields>
6066         <links/>
6067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6068             <actions>
6069                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6070                 <retrieve />
6071                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6072                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6073             </actions>
6074         </permacrud>
6075     </class>
6076         <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">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6078                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6079                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6080                 </fields>
6081                 <links/>
6082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6083             <actions>
6084                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6085                 <retrieve/>
6086                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6087                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6088             </actions>
6089         </permacrud>
6090         </class>
6091
6092
6093         <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">
6094                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6095                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6096                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6097                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6098                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6099                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6100                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6101                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6102                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6103                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6104                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6105                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6106                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6107                 </fields>
6108                 <links>
6109                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6110                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6111                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6112                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6113                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6114                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6115                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6116                 </links>
6117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6118             <actions>
6119                 <create permission="TRANSIT_COPY">
6120                     <context link="target_copy" field="owner"/>
6121                 </create>
6122                 <retrieve/>
6123                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6124                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6125             </actions>
6126         </permacrud>
6127         </class>
6128         <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">
6129                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6130                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6131                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6132                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6133                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6134                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6135                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6136                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6137                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6138                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6139                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6140                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6141                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6142                 </fields>
6143                 <links>
6144                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6145                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6146                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6147                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6148                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6149                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6150                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6151                 </links>
6152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6153             <actions>
6154                 <create permission="TRANSIT_COPY" context_field="owner">
6155                     <context link="target_copy" field="circ_lib"/>
6156                 </create>
6157                 <retrieve/>
6158                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6159                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6160             </actions>
6161         </permacrud>
6162         </class>
6163         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6164                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6165                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6166                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6167                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6168                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6169                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6170                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6171                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6172                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6173                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6174                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6175                 </fields>
6176                 <links>
6177                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6178                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6179                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6180                 </links>
6181         </class>
6182         <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">
6183                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6184                         <field name="grp" />
6185                         <field name="id" reporter:datatype="id" />
6186                         <field name="usr" />
6187                 </fields>
6188                 <links>
6189                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6190                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6191                 </links>
6192         </class>
6193         <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">
6194                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6195                         <field name="id" reporter:datatype="id" />
6196                         <field name="fq_field" reporter:datatype="text"/>
6197                         <field name="identity_value" reporter:datatype="text"/>
6198                         <field name="translation" reporter:datatype="text"/>
6199                         <field name="string" reporter:datatype="text"/>
6200                 </fields>
6201                 <links>
6202                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6203                 </links>
6204         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6205             <actions>
6206                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6207                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6208                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6209                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6210             </actions>
6211         </permacrud>
6212         </class>
6213         <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">
6214                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6215                         <field name="id" reporter:datatype="id" />
6216                         <field name="fm_class" reporter:datatype="text"/>
6217                         <field name="field" reporter:datatype="text"/>
6218                         <field name="owner" reporter:datatype="org_unit"/>
6219                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6220                 </fields>
6221                 <links>
6222                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6223                 </links>
6224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6225             <actions>
6226                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6227                 <retrieve/>
6228                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6229                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6230             </actions>
6231         </permacrud>
6232         </class>
6233         <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">
6234                 <fields oils_persist:primary="code">
6235                         <field name="code" reporter:datatype="id" />
6236                         <field name="marc_code" reporter:datatype="text"/>
6237                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6238                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6239                 </fields>
6240                 <links/>
6241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6242             <actions>
6243                 <create permission="CREATE_LOCALE" global_required="true"/>
6244                 <retrieve/>
6245                 <update permission="UPDATE_LOCALE" global_required="true"/>
6246                 <delete permission="DELETE_LOCALE" global_required="true"/>
6247             </actions>
6248         </permacrud>
6249         </class>
6250         <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">
6251                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6252                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6253                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6254                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6255             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6256                 </fields>
6257                 <links>
6258                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6259                 </links>
6260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6261             <actions>
6262                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6263                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6264                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6265                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6266             </actions>
6267         </permacrud>
6268         </class>
6269
6270         <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">
6271                 <fields oils_persist:primary="id">
6272                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6273                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6274                 </fields>
6275                 <links/>
6276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6277             <actions>
6278                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6279                 <retrieve/>
6280                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6281                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6282             </actions>
6283         </permacrud>
6284         </class>
6285
6286         <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">
6287                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6288                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6289                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6290                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6291                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6292                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6293                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6294                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6295                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6296                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6297                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6298                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6299                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6300                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6301                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6302                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6303                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6304                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6305                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6306                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6307                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6308                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6309                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6310                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6311                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6312                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6313                 </fields>
6314                 <links>
6315                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6316                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6317                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6318                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6319                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6320                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6321                 </links>
6322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6323             <actions>
6324                 <create permission="user_request.create">
6325                     <context link="usr" field="home_ou"/>
6326                                 </create>
6327                 <retrieve permission="user_request.view">
6328                     <context link="usr" field="home_ou"/>
6329                                 </retrieve>
6330                 <update permission="user_request.update">
6331                     <context link="usr" field="home_ou"/>
6332                                 </update>
6333                 <delete permission="user_request.delete">
6334                     <context link="usr" field="home_ou"/>
6335                                 </delete>
6336             </actions>
6337         </permacrud>
6338         </class>
6339
6340         <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">
6341                 <fields oils_persist:primary="code">
6342                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6343                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6344                 </fields>
6345                 <links/>
6346         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6347             <actions>
6348                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6349                 <retrieve/>
6350                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6351                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6352             </actions>
6353         </permacrud>
6354         </class>
6355
6356         <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">
6357                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6358                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6359                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6360                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6361                         <field reporter:label="Ratio" name="ratio" />
6362                 </fields>
6363                 <links>
6364                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6365                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6366                 </links>
6367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6368                         <actions>
6369                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6370                                 <retrieve/>
6371                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6372                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6373                         </actions>
6374                 </permacrud>
6375         </class>
6376
6377         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6378                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6379                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6380                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6381                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6382                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6383                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6384                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6385                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6386                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6387                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6388                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6389                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6390                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6391                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6392                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6393                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6394                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6395                 </fields>
6396                 <links>
6397                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6398                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6399             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6400             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6401             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6402                 </links>
6403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6404             <actions>
6405                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6406                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6407                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6408                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6409             </actions>
6410         </permacrud>
6411         </class>
6412
6413         <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">
6414                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6415                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6416                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6417                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6418                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6419                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6420                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6421                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6422                 </fields>
6423                 <links>
6424                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6425                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6426                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6427                 </links>
6428         </class>
6429
6430         <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">
6431                 <fields oils_persist:primary="code">
6432                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6433                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6434                 </fields>
6435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6436             <actions>
6437                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6438                 <retrieve/>
6439                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6440                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6441             </actions>
6442                 </permacrud>
6443         </class>
6444
6445         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6446                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6447                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6448                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6449                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6450                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6451                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6452                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6453                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6454                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6455                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6456                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6457                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6458                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6459                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6460                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6461                 </fields>
6462                 <links>
6463                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6464                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6465                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6466                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6467                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6468                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6469                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6470                 </links>
6471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6472             <actions>
6473                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6474                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6475                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6476                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6477             </actions>
6478         </permacrud>
6479         </class>
6480
6481         <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">
6482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6483                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6484                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6485                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6486                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6487                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6488                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6489                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6490                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6491                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6492                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6493                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6494                 </fields>
6495                 <links>
6496                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6497                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6498                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6499                 </links>
6500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6501             <actions>
6502                 <create   permission="ADMIN_INVOICE">
6503                                         <context link="invoice" field="receiver"/>
6504                                 </create>
6505                 <retrieve permission="ADMIN_INVOICE">
6506                                         <context link="invoice" field="receiver"/>
6507                                 </retrieve>
6508                 <update   permission="ADMIN_INVOICE">
6509                                         <context link="invoice" field="receiver"/>
6510                                 </update>
6511                                 <delete   permission="ADMIN_INVOICE">
6512                                         <context link="invoice" field="receiver"/>
6513                                 </delete>
6514             </actions>
6515         </permacrud>
6516         </class>
6517
6518         <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">
6519                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6520                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6521                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6522                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6523                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6524                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6525                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6526                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6527                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6528                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6529                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6530                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6531                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6532                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6533                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6534                 </fields>
6535                 <links>
6536                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6537                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6538                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6539                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6540                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6541                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6542                 </links>
6543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6544             <actions>
6545                 <create   permission="ADMIN_INVOICE">
6546                                         <context link="invoice" field="receiver"/>
6547                                 </create>
6548                 <retrieve permission="ADMIN_INVOICE">
6549                                         <context link="invoice" field="receiver"/>
6550                                 </retrieve>
6551                 <update   permission="ADMIN_INVOICE">
6552                                         <context link="invoice" field="receiver"/>
6553                                 </update>
6554                                 <delete   permission="ADMIN_INVOICE">
6555                                         <context link="invoice" field="receiver"/>
6556                                 </delete>
6557             </actions>
6558         </permacrud>
6559         </class>
6560
6561         <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">
6562                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6563                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6564                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6565                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6566                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6567                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6568                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6569                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6570                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6571                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6572                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6573                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6574                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6575                 </fields>
6576                 <links>
6577                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6578                 </links>
6579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6580             <actions>
6581                 <create permission="ADMIN_PROVIDER">
6582                     <context link="provider" field="owner"/>
6583                 </create>
6584                 <retrieve permission="ADMIN_PROVIDER">
6585                     <context link="provider" field="owner"/>
6586                 </retrieve>
6587                 <update permission="ADMIN_PROVIDER">
6588                     <context link="provider" field="owner"/>
6589                 </update>
6590                 <delete permission="ADMIN_PROVIDER">
6591                     <context link="provider" field="owner"/>
6592                 </delete>
6593             </actions>
6594         </permacrud>
6595         </class>
6596
6597         <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">
6598                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6599                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6600                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6601                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6602                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6603                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6604                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6605         </fields>
6606                 <links>
6607                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6608                 </links>
6609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6610             <actions>
6611                 <create permission="ADMIN_PROVIDER">
6612                     <context link="provider" field="owner"/>
6613                 </create>
6614                 <retrieve permission="ADMIN_PROVIDER">
6615                     <context link="provider" field="owner"/>
6616                 </retrieve>
6617                 <update permission="ADMIN_PROVIDER">
6618                     <context link="provider" field="owner"/>
6619                 </update>
6620                 <delete permission="ADMIN_PROVIDER">
6621                     <context link="provider" field="owner"/>
6622                 </delete>
6623             </actions>
6624         </permacrud>
6625     </class>
6626         <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">
6627                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6628                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6629                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6630                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6631                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6632                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6633                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6634                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6635                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6636                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6637                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6638                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6639                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6640                 </fields>
6641                 <links>
6642                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6643                 </links>
6644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6645             <actions>
6646                 <create permission="ADMIN_PROVIDER">
6647                     <context link="contact" jump='provider' field="owner"/>
6648                 </create>
6649                 <retrieve permission="ADMIN_PROVIDER">
6650                     <context link="contact" jump='provider' field="owner"/>
6651                 </retrieve>
6652                 <update permission="ADMIN_PROVIDER">
6653                     <context link="contact" jump='provider' field="owner"/>
6654                 </update>
6655                 <delete permission="ADMIN_PROVIDER">
6656                     <context link="contact" jump='provider' field="owner"/>
6657                 </delete>
6658             </actions>
6659         </permacrud>
6660         </class>
6661
6662         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6663                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6664                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6665                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6666                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6667                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6668                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6669                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6670                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6671                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6672                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6673                 </fields>
6674                 <links>
6675                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6676                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6677                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6678                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6679                 </links>
6680         </class>
6681
6682         <class id="acqfc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6683                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6684                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6685                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6686                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6687                 </fields>
6688                 <links>
6689             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6690                 </links>
6691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6692                         <actions>
6693                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6694                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6695                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6696                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6697                         </actions>
6698                 </permacrud>
6699         </class>
6700
6701         <class id="acqfy" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6702                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6703                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6704                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6705                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6706                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6707                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6708                 </fields>
6709                 <links>
6710                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6711                 </links>
6712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6713                         <actions>
6714                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6715                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6716                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6717                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6718                         </actions>
6719                 </permacrud>
6720         </class>
6721
6722         <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">
6723                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6724                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6725                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6726                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6727                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6728                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6729                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6730                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6731                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6732                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6733                 </fields>
6734                 <links>
6735                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6736                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6737             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6738             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6739                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6740                 </links>
6741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6742             <actions>
6743                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6744                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6745                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6746                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6747             </actions>
6748         </permacrud>
6749         </class>
6750
6751         <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">
6752                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6753                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6754                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6755                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6756                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6757                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6758                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6759                 </fields>
6760                 <links>
6761                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6762                 </links>
6763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6764                         <actions>
6765                                 <create permission="ADMIN_FUNDING_SOURCE">
6766                     <context link="funding_source" field="owner"/>
6767                 </create>
6768                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6769                     <context link="funding_source" field="owner"/>
6770                 </retrieve>
6771                                 <update permission="ADMIN_FUNDING_SOURCE">
6772                     <context link="funding_source" field="owner"/>
6773                 </update>
6774                                 <delete permission="ADMIN_FUNDING_SOURCE">
6775                     <context link="funding_source" field="owner"/>
6776                 </delete>
6777                         </actions>
6778                 </permacrud>
6779         </class>
6780
6781         <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">
6782                 <fields oils_persist:primary="id">
6783                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6784                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6785                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6786                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6787                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6788                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6789                 </fields>
6790                 <links>
6791                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6792                 </links>
6793         </class>
6794
6795         <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">
6796                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6797                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6798                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6799                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6800                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6801                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6802                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6803                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6804                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6805                 </fields>
6806                 <links>
6807                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6808                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6809                 </links>
6810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6811                         <actions>
6812                                 <create permission="ADMIN_ACQ_FUND">
6813                     <context link="fund" field="org"/>
6814                 </create>
6815                                 <retrieve permission="ADMIN_ACQ_FUND">
6816                     <context link="fund" field="org"/>
6817                 </retrieve>
6818                                 <update permission="ADMIN_ACQ_FUND">
6819                     <context link="fund" field="org"/>
6820                 </update>
6821                                 <delete permission="ADMIN_ACQ_FUND">
6822                     <context link="fund" field="org"/>
6823                 </delete>
6824                         </actions>
6825                 </permacrud>
6826         </class>
6827
6828         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6829                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6830                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6831                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6832                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6833                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6834                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6835                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6836                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6837                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6838                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6839                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6840                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6841                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6842                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6843                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6844                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6845                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
6846                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
6847                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
6848                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
6849                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
6850                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
6851                 </fields>
6852                 <links>
6853                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6854                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6855             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6856             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6857             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6858             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
6859             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
6860             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
6861             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
6862             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
6863             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
6864                 </links>
6865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6866             <actions>
6867                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6868                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6869                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6870                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6871             </actions>
6872         </permacrud>
6873         </class>
6874
6875         <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">
6876                 <fields oils_persist:primary="fund">
6877                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6878                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6879                 </fields>
6880                 <links>
6881                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6882                 </links>
6883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6884             <actions>
6885                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6886                                         <context link="fund" field="org" />
6887                 </retrieve>
6888             </actions>
6889         </permacrud>
6890         </class>
6891
6892         <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">
6893                 <fields oils_persist:primary="fund">
6894                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6895                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6896                 </fields>
6897                 <links>
6898                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6899                 </links>
6900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6901             <actions>
6902                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6903                                         <context link="fund" field="org" />
6904                 </retrieve>
6905             </actions>
6906         </permacrud>
6907         </class>
6908
6909         <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">
6910                 <fields oils_persist:primary="fund">
6911                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6912                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6913                 </fields>
6914                 <links>
6915                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6916                 </links>
6917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6918             <actions>
6919                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6920                                         <context link="fund" field="org" />
6921                 </retrieve>
6922             </actions>
6923         </permacrud>
6924         </class>
6925
6926         <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">
6927                 <fields oils_persist:primary="fund">
6928                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6929                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6930                 </fields>
6931                 <links>
6932                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6933                 </links>
6934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6935             <actions>
6936                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6937                                         <context link="fund" field="org" />
6938                 </retrieve>
6939             </actions>
6940         </permacrud>
6941         </class>
6942
6943         <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">
6944                 <fields oils_persist:primary="fund">
6945                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6946                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6947                 </fields>
6948                 <links>
6949                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6950                 </links>
6951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6952             <actions>
6953                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6954                                         <context link="fund" field="org" />
6955                 </retrieve>
6956             </actions>
6957         </permacrud>
6958         </class>
6959
6960    <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">
6961         <fields oils_persist:primary="fund">
6962             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6963             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6964         </fields>
6965         <links>
6966             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6967         </links>
6968     </class>
6969
6970    <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">
6971         <fields oils_persist:primary="fund">
6972             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6973             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6974         </fields>
6975         <links>
6976             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6977         </links>
6978     </class>
6979
6980    <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">
6981         <fields oils_persist:primary="fund">
6982             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6983             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6984         </fields>
6985         <links>
6986             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6987         </links>
6988     </class>
6989
6990    <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">
6991         <fields oils_persist:primary="fund">
6992             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6993             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6994         </fields>
6995         <links>
6996             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6997         </links>
6998     </class>
6999
7000    <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">
7001         <fields oils_persist:primary="fund">
7002             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7003             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7004         </fields>
7005         <links>
7006             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7007         </links>
7008     </class>
7009
7010         <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">
7011                 <fields oils_persist:primary="funding_source">
7012                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7013                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7014                 </fields>
7015                 <links>
7016                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7017                 </links>
7018         </class>
7019
7020         <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">
7021                 <fields oils_persist:primary="funding_source">
7022                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7023                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7024                 </fields>
7025                 <links>
7026                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7027                 </links>
7028         </class>
7029
7030         <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">
7031                 <fields oils_persist:primary="funding_source">
7032                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7033                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7034                 </fields>
7035                 <links>
7036                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7037                 </links>
7038         </class>
7039
7040         <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">
7041                 <fields oils_persist:primary="fund">
7042                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7043                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7044                 </fields>
7045                 <links>
7046                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7047                 </links>
7048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7049             <actions>
7050                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7051                                         <context link="fund" field="org" />
7052                 </retrieve>
7053             </actions>
7054         </permacrud>
7055     </class>
7056
7057         <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">
7058                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7059                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7060                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7061                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7062                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7063                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7064                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7065                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7066                 </fields>
7067                 <links>
7068                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7069                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7070                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7071                 </links>
7072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7073                         <actions>
7074                                 <create permission="ADMIN_ACQ_FUND">
7075                     <context link="fund" field="org"/>
7076                 </create>
7077                                 <retrieve permission="ADMIN_ACQ_FUND">
7078                     <context link="fund" field="org"/>
7079                 </retrieve>
7080                                 <update permission="ADMIN_ACQ_FUND">
7081                     <context link="fund" field="org"/>
7082                 </update>
7083                                 <delete permission="ADMIN_ACQ_FUND">
7084                     <context link="fund" field="org"/>
7085                 </delete>
7086                         </actions>
7087                 </permacrud>
7088         </class>
7089
7090     <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">
7091         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7092             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7093             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7094             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7095             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7096             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7097             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7098             <field reporter:label="Note" name="note" reporter:datatype="text" />
7099             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7100         </fields>
7101         <links>
7102             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7103             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7104             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7105         </links>
7106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7107                         <actions>
7108                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7109                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7110                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7111                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7112                         </actions>
7113                 </permacrud>
7114     </class>
7115
7116         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7117                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7118                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7119                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7120                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7121                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7122                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7123                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7124                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7125                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7126                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7127                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7128                 </fields>
7129                 <links>
7130                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7131                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7132                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7133                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7134                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7135                 </links>
7136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7137                         <actions>
7138                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7139                         </actions>
7140                 </permacrud>
7141         </class>
7142
7143         <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">
7144                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7145                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7146                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7147                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7148                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7149                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7150                 </fields>
7151                 <links>
7152                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7153                 </links>
7154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7155                         <actions>
7156                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7157                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7158                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7159                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7160                         </actions>
7161                 </permacrud>
7162         </class>
7163
7164         <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">
7165                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7166                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7167                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7168                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7169                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7170                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7171                         <field reporter:label="State" name="state" reporter:datatype="text" />
7172                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7173                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7174                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7175                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7176                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7177                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7178                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7179                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7180                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7181                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7182                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7183                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7184                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7185                 </fields>
7186                 <links>
7187                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7188                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7189                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7190                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7191                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7192                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7193                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7194                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7195                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7196                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7197                 </links>
7198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7199                         <actions>
7200                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7201                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7202                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7203                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7204                         </actions>
7205                 </permacrud>
7206         </class>
7207
7208         <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">
7209                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7210                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7211                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7212                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7213                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7214                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7215                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7216                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7217                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7218                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7219                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7220                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7221                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7222                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7223                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7224                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7225                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7226                 </fields>
7227                 <links>
7228                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7229                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7230                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7231                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7232                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7233                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7234                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7235                 </links>
7236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7237             <actions>
7238                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7239             </actions>
7240                 </permacrud>
7241         </class>
7242
7243         <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">
7244                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7245                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7246                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7247                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7248                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7249                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7250                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7251                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7252                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7253                 </fields>
7254                 <links>
7255                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7256                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7257                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7258                 </links>
7259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7260             <actions>
7261                 <create permission="CREATE_PURCHASE_ORDER">
7262                     <context link="purchase_order" field="ordering_agency"/>
7263                 </create>
7264                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7265                     <context link="purchase_order" field="ordering_agency"/>
7266                 </retrieve>
7267                 <update permission="CREATE_PURCHASE_ORDER">
7268                     <context link="purchase_order" field="ordering_agency"/>
7269                 </update>
7270                 <delete permission="CREATE_PURCHASE_ORDER">
7271                     <context link="purchase_order" field="ordering_agency"/>
7272                 </delete>
7273             </actions>
7274                 </permacrud>
7275         </class>
7276
7277         <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">
7278                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7279                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7280                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7281                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7282                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7283                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7284                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7285                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7286                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7287                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7288                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7289                 </fields>
7290                 <links>
7291                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7292                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7293                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7294                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7295                 </links>
7296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7297             <actions>
7298                 <create permission="CREATE_PURCHASE_ORDER">
7299                     <context link="purchase_order" field="ordering_agency"/>
7300                 </create>
7301                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7302                     <context link="purchase_order" field="ordering_agency"/>
7303                 </retrieve>
7304                 <update permission="CREATE_PURCHASE_ORDER">
7305                     <context link="purchase_order" field="ordering_agency"/>
7306                 </update>
7307                 <delete permission="CREATE_PURCHASE_ORDER">
7308                     <context link="purchase_order" field="ordering_agency"/>
7309                 </delete>
7310             </actions>
7311                 </permacrud>
7312         </class>
7313
7314         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7316                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7317                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7318                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7319                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7320                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7321                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7322                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7323                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7324                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7325                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7326                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7327                         <field reporter:label="State" name="state" reporter:datatype="text" />
7328                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7329                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7330                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7331                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7332                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7333                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7334                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7335                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7336                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7337                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7338                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7339                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7340                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7341                 </fields>
7342                 <links>
7343                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7344                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7345                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7346                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7347                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7348                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7349                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7350                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7351                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7352                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7353                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7354                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7355                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7356                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7357                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7358                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7359                 </links>
7360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7361                         <actions>
7362                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7363                                         <context link="purchase_order" field="ordering_agency"/>
7364                                         <context link="picklist" field="org_unit"/>
7365                                 </retrieve>
7366                         </actions>
7367                 </permacrud>
7368         </class>
7369
7370         <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">
7371                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7372                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7373                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7374                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7375                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7376                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7377                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7378                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7379                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7380                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7381                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7382                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7383                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7384                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7385                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7386                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7387                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7388                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7389                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7390                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7391                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7392                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7393                 </fields>
7394                 <links>
7395                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7396                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7397                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7398                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7399                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7400                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7401                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7402                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7403                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7404                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7405                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7406                 </links>
7407                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7408                         <actions>
7409                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7410                                         <context link="purchase_order" field="ordering_agency"/>
7411                                         <context link="picklist" field="org_unit"/>
7412                                 </retrieve>
7413                         </actions>
7414                 </permacrud>
7415         </class>
7416
7417         <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">
7418                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7419                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7420                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7421                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7422                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7423                 </fields>
7424                 <links>
7425                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7426                 </links>
7427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7428                         <actions>
7429                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7430                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7431                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7432                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7433                         </actions>
7434                 </permacrud>
7435         </class>
7436
7437         <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">
7438                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7439                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7440                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7441                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7442                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7443                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7444                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7445                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7446                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7447                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7448                 </fields>
7449                 <links>
7450                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7451                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7452                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7453                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7454                 </links>
7455         </class>
7456
7457         <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">
7458                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7459                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7460                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7461                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7462                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7463                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7464                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7465                 </fields>
7466                 <links>
7467                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7468                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7469                 </links>
7470         </class>
7471
7472         <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">
7473                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7474                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7475                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7476                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7477                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7478                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7479                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7480                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7481                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7482                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7483                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7484                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7485                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7486                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7487                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7488                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7489                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7490                 </fields>
7491                 <links>
7492                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7493                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7494                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7495                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7496                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7497                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7498                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7499                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7500                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7501                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7502                 </links>
7503         </class>
7504
7505         <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">
7506                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7507                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7508                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7509                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7510                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7511                 </fields>
7512                 <links/>
7513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7514                         <actions>
7515                                 <retrieve />
7516                         </actions>
7517                 </permacrud>
7518         </class>
7519
7520         <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">
7521                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7522                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7523                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7524                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7525                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7526                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7527             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7528                 </fields>
7529                 <links/>
7530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7531             <actions>
7532                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7533                 <retrieve />
7534                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7535                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7536             </actions>
7537         </permacrud>
7538         </class>
7539
7540         <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">
7541                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7542                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7543                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7544                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7545                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7546                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7547                 </fields>
7548                 <links/>
7549         </class>
7550         <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">
7551                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7552                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7553                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7554                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7555                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7556                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7557                 </fields>
7558                 <links>
7559                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7560                 </links>
7561         </class>
7562
7563         <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">
7564             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7565                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7566                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7567                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7568                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7569                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7570                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7571         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7572
7573             </fields>
7574             <links>
7575                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7576             </links>
7577             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7578                 <actions>
7579                     <create permission="ADMIN_PROVIDER">
7580                         <context link="provider" field="owner"/>
7581                     </create>
7582                     <retrieve permission="ADMIN_PROVIDER">
7583                         <context link="provider" field="owner"/>
7584                     </retrieve>
7585                     <update permission="ADMIN_PROVIDER">
7586                         <context link="provider" field="owner"/>
7587                     </update>
7588                     <delete permission="ADMIN_PROVIDER">
7589                         <context link="provider" field="owner"/>
7590                     </delete>
7591                 </actions>
7592             </permacrud>
7593         </class>
7594         
7595         <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">
7596             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7597                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7598                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7599                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7600                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7601             </fields>
7602             <links>
7603                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7604             </links>
7605             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7606                 <actions>
7607                     <create permission="ADMIN_PROVIDER">
7608                         <context link="provider" field="owner"/>
7609                     </create>
7610                     <retrieve permission="ADMIN_PROVIDER">
7611                         <context link="provider" field="owner"/>
7612                     </retrieve>
7613                     <update permission="ADMIN_PROVIDER">
7614                         <context link="provider" field="owner"/>
7615                     </update>
7616                     <delete permission="ADMIN_PROVIDER">
7617                         <context link="provider" field="owner"/>
7618                     </delete>
7619                 </actions>
7620             </permacrud>
7621         </class>
7622         
7623         <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">
7624             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7625                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7626                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7627                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7628                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7629                 </fields>
7630                 <links/>
7631         </class>
7632
7633         <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">
7634                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7635                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7636                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7637                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7638                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7639                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7640                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7641                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7642                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7643                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7644                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7645                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7646                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7647                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7648                 </fields>
7649                 <links>
7650                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7651                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7652                 </links>
7653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7654             <actions>
7655                 <create permission="ADMIN_PROVIDER">
7656                     <context link="provider" field="owner"/>
7657                 </create>
7658                 <retrieve permission="ADMIN_PROVIDER">
7659                     <context link="provider" field="owner"/>
7660                 </retrieve>
7661                 <update permission="ADMIN_PROVIDER">
7662                     <context link="provider" field="owner"/>
7663                 </update>
7664                 <delete permission="ADMIN_PROVIDER">
7665                     <context link="provider" field="owner"/>
7666                 </delete>
7667             </actions>
7668         </permacrud>
7669         </class>
7670
7671         <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">
7672                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7673                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7674                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7675                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7676                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7677                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7678                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7679                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7680                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7681                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7682                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7683                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7684                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7685                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7686                 </fields>
7687                 <links>
7688                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7689                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7690                 </links>
7691         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7692             <actions>
7693                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7694                     <context link="account" jump="provider" field="owner"/>
7695                 </retrieve>
7696                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7697                     <context link="account" jump="provider" field="owner"/>
7698                 </update>
7699                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7700                     <context link="account" jump="provider" field="owner"/>
7701                 </delete>
7702             </actions>
7703         </permacrud>
7704         </class>
7705
7706
7707         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7708                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7709                         <field name="id" reporter:datatype="id" />
7710                         <field name="parent" reporter:datatype="link"/>
7711                         <field name="owner" reporter:datatype="link"/>
7712                         <field name="create_time" reporter:datatype="timestamp"/>
7713                         <field name="name" reporter:datatype="text"/>
7714                         <field name="shared" reporter:datatype="bool"/>
7715                         <field name="share_with" reporter:datatype="link"/>
7716                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7717                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7718                 </fields>
7719                 <links>
7720                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7721                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7722                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7723                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7724                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7725                 </links>
7726         </class>
7727         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7728                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7729                         <field name="id" reporter:datatype="id" />
7730                         <field name="parent" reporter:datatype="link"/>
7731                         <field name="owner" reporter:datatype="link"/>
7732                         <field name="create_time" reporter:datatype="timestamp"/>
7733                         <field name="name" reporter:datatype="text"/>
7734                         <field name="shared" reporter:datatype="bool"/>
7735                         <field name="share_with" reporter:datatype="link"/>
7736                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7737                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7738                 </fields>
7739                 <links>
7740                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7741                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7742                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7743                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7744                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7745                 </links>
7746         </class>
7747         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7748                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7749                         <field name="id" reporter:datatype="id" />
7750                         <field name="parent" reporter:datatype="link"/>
7751                         <field name="owner" reporter:datatype="link"/>
7752                         <field name="create_time" reporter:datatype="timestamp"/>
7753                         <field name="name" reporter:datatype="text"/>
7754                         <field name="shared" reporter:datatype="bool"/>
7755                         <field name="share_with" reporter:datatype="link"/>
7756                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7757                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7758                 </fields>
7759                 <links>
7760                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7761                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7762                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7763                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7764                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7765                 </links>
7766         </class>
7767         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7768                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7769                         <field name="id" reporter:datatype="id" />
7770                         <field name="owner" reporter:datatype="link"/>
7771                         <field name="create_time" reporter:datatype="timestamp"/>
7772                         <field name="name" reporter:datatype="text"/>
7773                         <field name="data" reporter:datatype="text"/>
7774                         <field name="folder" reporter:datatype="link"/>
7775                         <field name="description" reporter:datatype="text"/>
7776                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7777                 </fields>
7778                 <links>
7779                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7780                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7781                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7782                 </links>
7783         </class>
7784         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7785                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7786                         <field name="id" reporter:datatype="id" />
7787                         <field name="owner" reporter:datatype="link"/>
7788                         <field name="create_time" reporter:datatype="timestamp"/>
7789                         <field name="template" reporter:datatype="link"/>
7790                         <field name="data" reporter:datatype="text"/>
7791                         <field name="folder" reporter:datatype="link"/>
7792                         <field name="recur" reporter:datatype="bool"/>
7793                         <field name="recurrence" reporter:datatype="interval"/>
7794                         <field name="name" reporter:datatype="text"/>
7795                         <field name="description" reporter:datatype="text"/>
7796                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7797                 </fields>
7798                 <links>
7799                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7800                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7801                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7802                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7803                 </links>
7804         </class>
7805         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7806                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7807                         <field name="id" reporter:datatype="id" />
7808                         <field name="runner" reporter:datatype="link"/>
7809                         <field name="start_time" reporter:datatype="timestamp"/>
7810                         <field name="complete_time" reporter:datatype="timestamp"/>
7811                         <field name="run_time" reporter:datatype="timestamp"/>
7812                         <field name="email" reporter:datatype="text"/>
7813                         <field name="excel_format" reporter:datatype="bool"/>
7814                         <field name="csv_format" reporter:datatype="bool"/>
7815                         <field name="html_format" reporter:datatype="bool"/>
7816                         <field name="error_code" reporter:datatype="int"/>
7817                         <field name="error_text" reporter:datatype="text"/>
7818                         <field name="report" reporter:datatype="link"/>
7819                         <field name="folder" reporter:datatype="link"/>
7820                         <field name="chart_pie" reporter:datatype="bool"/>
7821                         <field name="chart_bar" reporter:datatype="bool"/>
7822                         <field name="chart_line" reporter:datatype="bool"/>
7823                 </fields>
7824                 <links>
7825                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7826                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7827                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7828                 </links>
7829         </class>
7830         <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">
7831                 <fields oils_persist:primary="id">
7832                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7833                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7834                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7835                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7836                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7837                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7838                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7839                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7840                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7841                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7842                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7843                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7844                 </fields>
7845                 <links>
7846                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7847                 </links>
7848         </class>
7849         <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">
7850                 <fields oils_persist:primary="id">
7851                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7852                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7853                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7854                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7855                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7856                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7857                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7858                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7859                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7860                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7861                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7862                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7863                 </fields>
7864                 <links>
7865                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7866                 </links>
7867         </class>
7868         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7869                 <fields oils_persist:primary="id">
7870                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7871                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7872                         <field reporter:label="Fingerprint" name="fingerprint" />
7873                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7874                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7875                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7876                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7877                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7878                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7879                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7880                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7881                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7882                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7883                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7884                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7885                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7886                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7887                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7888                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7889                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7890                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7891                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7892                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7893                 </fields>
7894                 <links>
7895                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7896                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7897                 </links>
7898         </class>
7899         <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">
7900                 <fields oils_persist:primary="id">
7901                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7902                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7903                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7904                 </fields>
7905                 <links>
7906                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7907                 </links>
7908         </class>
7909         <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">
7910                 <fields oils_persist:primary="id">
7911                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7912                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7913                 </fields>
7914                 <links>
7915                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7916                 </links>
7917         </class>
7918         <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">
7919                 <fields oils_persist:primary="id">
7920                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7921                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7922                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7923                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7924                 </fields>
7925                 <links>
7926                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7927                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7928                 </links>
7929         </class>
7930         <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">
7931                 <fields oils_persist:primary="xact">
7932                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7933                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7934                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7935                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7936                 </fields>
7937                 <links>
7938                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7939                 </links>
7940         </class>
7941         <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">
7942                 <fields oils_persist:primary="xact">
7943                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7944                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7945                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7946                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7947                 </fields>
7948                 <links>
7949                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7950                 </links>
7951         </class>
7952         <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)">
7953                 <fields oils_persist:primary="id">
7954                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7955                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7956                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7957                 </fields>
7958                 <links>
7959                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7960                 </links>
7961         </class>
7962         <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">
7963                 <fields oils_persist:primary="id">
7964                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7965                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7966                 </fields>
7967                 <links>
7968                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7969                 </links>
7970         </class>
7971         <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">
7972                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7973                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7974                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7975                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7976                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7977                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7978                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7979                 </fields>
7980                 <links>
7981                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7982                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7983                 </links>
7984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7985                         <actions>
7986                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7987                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7988                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7989                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7990                         </actions>
7991                 </permacrud>
7992         </class>
7993         <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">
7994                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7995                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7996                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7997                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7998                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7999                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8000                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8001                 </fields>
8002                 <links>
8003                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8004                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8005                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8006                 </links>
8007                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8008                         <actions>
8009                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8010                                         <context link="formula" field="owner"/>
8011                                 </create>
8012                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8013                                         <context link="formula" field="owner"/>
8014                                 </retrieve>
8015                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8016                                         <context link="formula" field="owner"/>
8017                                 </update>
8018                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8019                                         <context link="formula" field="owner"/>
8020                                 </delete>
8021                         </actions>
8022                 </permacrud>
8023         </class>
8024
8025         <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">
8026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8027                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8028                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8029                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8030                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8031                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8032                 </fields>
8033                 <links>
8034                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8035                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8036                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8037                 </links>
8038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8039                         <actions>
8040                                 <create permission="CREATE_PURCHASE_ORDER">
8041                                         <context link="formula" field="owner"/>
8042                 </create>
8043                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8044                                         <context link="formula" field="owner"/>
8045                 </retrieve>
8046                                 <update permission="CREATE_PURCHASE_ORDER">
8047                                         <context link="formula" field="owner"/>
8048                 </update>
8049                                 <delete permission="CREATE_PURCHASE_ORDER">
8050                                         <context link="formula" field="owner"/>
8051                 </delete>
8052                         </actions>
8053                 </permacrud>
8054         </class>
8055
8056         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8057                 <fields oils_persist:primary="id">
8058                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8059                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8060                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8061                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8062                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8063                 </fields>
8064                 <links>
8065                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8066                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8067                 </links>
8068         </class>
8069
8070         <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">
8071                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8072                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8073                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8074                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8075                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8076                 </fields>
8077                 <links>
8078                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8079                 </links>
8080                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8081                         <actions>
8082                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8083                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8084                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8085                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8086                         </actions>
8087                 </permacrud>
8088         </class>
8089
8090         <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">
8091                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8092                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8093                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8094                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8095                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8096                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8097                 </fields>
8098                 <links>
8099                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8100                 </links>
8101                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8102                         <actions>
8103                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8104                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8105                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8106                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8107                         </actions>
8108                 </permacrud>
8109         </class>
8110
8111         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8112                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8113                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8114                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8115                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8116                 </fields>
8117                 <links>
8118                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8119                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8120                 </links>
8121         </class>
8122
8123         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8124                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8125                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8126                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8127                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8128                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8129                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8130                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8131                 </fields>
8132                 <links>
8133                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8134                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8135                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8136                 </links>
8137         </class>
8138
8139         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8141                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8142                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8143                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8144                 </fields>
8145                 <links>
8146                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8147                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8148                 </links>
8149         </class>
8150
8151         <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">
8152                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8153                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8154                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8155                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8156                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8157                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8158                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8159                 </fields>
8160                 <links>
8161                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8162                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8163                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8164                 </links>
8165         </class>
8166
8167         <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">
8168                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8169                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8170                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8171                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8172                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8173                 </fields>
8174                 <links>
8175                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8176                 </links>
8177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8178             <actions>
8179                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8180                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8181                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8182                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8183             </actions>
8184                 </permacrud>
8185         </class>
8186
8187         <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">
8188                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8189                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8190                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8191                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8192                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8193                 </fields>
8194                 <links>
8195                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8196                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8197                 </links>
8198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8199                         <actions>
8200                                 <create permission="ADMIN_CLAIM_POLICY">
8201                                         <context link="claim_policy" field="org_unit"/>
8202                 </create>
8203                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8204                                         <context link="claim_policy" field="org_unit"/>
8205                 </retrieve>
8206                                 <update permission="ADMIN_CLAIM_POLICY">
8207                                         <context link="claim_policy" field="org_unit"/>
8208                 </update>
8209                                 <delete permission="ADMIN_CLAIM_POLICY">
8210                                         <context link="claim_policy" field="org_unit"/>
8211                 </delete>
8212                         </actions>
8213                 </permacrud>
8214         </class>
8215
8216     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8217         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8218             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8219             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8220             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8221             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8222             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8223             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8224             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8225             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8226             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8227             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8228             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8229             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8230             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8231             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8232             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8233         </fields>
8234     </class>
8235
8236     <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">
8237         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8238             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8239             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8240             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8241             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8242             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8243         </fields>
8244     </class>
8245
8246     <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">
8247         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8248             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8249             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8250             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8251             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8252             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8253             <field reporter:label="City" name="city" reporter:datatype="text"/>
8254             <field reporter:label="State" name="state" reporter:datatype="text"/>
8255             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8256             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8257             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8258         </fields>
8259     </class>
8260
8261     <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">
8262         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8263             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8264             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8265             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8266             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8267             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8268             <field reporter:label="City" name="city" reporter:datatype="text"/>
8269             <field reporter:label="State" name="state" reporter:datatype="text"/>
8270             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8271             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8272             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8273         </fields>
8274     </class>
8275
8276     <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">
8277         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8278             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8279             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8280             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8281             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8282             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8283             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8284         </fields>
8285     </class>
8286
8287         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8288                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8289                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8290                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8291                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8292                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8293                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8294                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8295                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8296                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8297                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8298                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8299                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8300                 </fields>
8301                 <links>
8302                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8303                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8304                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8305                 </links>
8306         </class>
8307
8308         <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">
8309                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8310                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8311                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8312                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8313                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8314                 </fields>
8315                 <links>
8316                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8317                 </links>
8318         </class>
8319
8320     <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">
8321         <fields>
8322             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8323             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8324             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8325         </fields>
8326                 <links>
8327                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8328                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8329                 </links>
8330     </class>
8331
8332     <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">
8333         <fields>
8334             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8335             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8336         </fields>
8337                 <links>
8338                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8339                 </links>
8340     </class>
8341
8342     <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">
8343         <fields>
8344             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8345             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8346             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8347         </fields>
8348                 <links>
8349                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8350                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8351                 </links>
8352     </class>
8353
8354     <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">
8355         <fields>
8356             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8357             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8358         </fields>
8359                 <links>
8360                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8361                 </links>
8362     </class>
8363
8364     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8365                 <oils_persist:source_definition>
8366
8367             SELECT  DISTINCT l.*
8368               FROM  action.unfulfilled_hold_loops l
8369                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8370               WHERE l.count = m.max
8371
8372                 </oils_persist:source_definition>
8373         <fields>
8374             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8375             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8376             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8377         </fields>
8378                 <links>
8379                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8380                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8381                 </links>
8382     </class>
8383
8384         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8385                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8386                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8387                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8388                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8389                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8390                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8391                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8392                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8393                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8394                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8395                 </fields>
8396                 <links>
8397                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8398                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8399                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8400                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8401                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8402                 </links>
8403         </class>
8404
8405         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8406                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8407                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8408                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8409                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8410                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8411                 </fields>
8412                 <links>
8413                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8414                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8415                 </links>
8416         </class>
8417
8418         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8419                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8420                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8421                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8422                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8423                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8424                 </fields>
8425                 <links>
8426                 </links>
8427         </class>
8428
8429         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8430                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8431                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8432                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8433                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8434                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8435                 </fields>
8436                 <links>
8437                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8438                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8439                 </links>
8440         </class>
8441         
8442         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8443                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8444                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8445                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8446                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8447                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8448                 </fields>
8449                 <links>
8450                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8451                 </links>
8452         </class>
8453         
8454         <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">
8455                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8456                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8457                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8458                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8459                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8460                 </fields>
8461                 <links>
8462                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8463                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8464                 </links>
8465         </class>
8466
8467         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8468                 <fields oils_persist:primary="name">
8469                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8470                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8471                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8472                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8473                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8474                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8475                 </fields>
8476                 <links>
8477                 </links>
8478         </class>
8479
8480         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8481                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8482                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8483                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8484                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8485                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8486                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8487                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8488                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8489                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8490                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8491                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8492                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8493                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8494                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8495                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8496                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8497                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8498                 </fields>
8499                 <links>
8500                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8501                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8502                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8503                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8504                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8505                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8506                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8507                 </links>
8508         </class>
8509
8510         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8511                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8512                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8513                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8514                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8515                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8516                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8517                 </fields>
8518                 <links>
8519                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8520                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8521                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8522                 </links>
8523         </class>
8524
8525         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8526                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8527                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8528                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8529                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8530                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8531                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8532                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8533                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8534                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8535                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8536                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8537                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8538                 </fields>
8539                 <links>
8540                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8541                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8542                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8543                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8544                 </links>
8545         </class>
8546
8547         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8548                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8549                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8550                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8551                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8552                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8553                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8554                 </fields>
8555                 <links>
8556                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8557                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8558                 </links>
8559         </class>
8560
8561         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8562                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8563                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8564                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8565                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8566                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8567                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8568                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8569                 </fields>
8570                 <links>
8571                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8572                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8573                 </links>
8574         </class>
8575
8576         <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">
8577                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8578                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8579                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8580                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8581                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8582                 </fields>
8583                 <links>
8584                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8585                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8586                 </links>
8587         </class>
8588
8589         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8590                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8591                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8592                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8593                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8594                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8595                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8596                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8597                 </fields>
8598                 <links>
8599                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8600                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8601                 </links>
8602         </class>
8603
8604         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8605                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8606                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8607                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8608                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8609                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8610                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8611                 </fields>
8612                 <links>
8613                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8614                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8615                 </links>
8616         </class>
8617
8618         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8619                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8620                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8621                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8622                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8623                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8624                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8625                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8626                 </fields>
8627                 <links>
8628                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8629                 </links>
8630         </class>
8631
8632         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8633                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8634                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8635                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8636                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8637                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8638                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8639                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8640                 </fields>
8641                 <links>
8642                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8643                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8644                 </links>
8645         </class>
8646
8647         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8648                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8649                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8650                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8651                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8652                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8653                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8654                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8655                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8656                 </fields>
8657                 <links>
8658                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8659                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8660                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8661                 </links>
8662         </class>
8663
8664         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8665                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8666                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8667                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8668                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8669                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8670                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8671                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8672                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8673                 </fields>
8674                 <links>
8675                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8676                 </links>
8677         </class>
8678
8679         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8680                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8681                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8682                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8683                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8684                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8685                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8686                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8687                 </fields>
8688                 <links>
8689                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8690                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8691                 </links>
8692         </class>
8693
8694         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8695                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8696                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8697                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8698                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8699                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8700                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8701                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8702                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8703                 </fields>
8704                 <links>
8705                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8706                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8707                 </links>
8708         </class>
8709
8710         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8711                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8712                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8713                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8714                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8715                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8716                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8717                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8718                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8719                 </fields>
8720                 <links>
8721                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8722                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8723                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8724                 </links>
8725         </class>
8726
8727         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8728                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8729                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8730                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8731                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8732                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8733                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8734                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8735                 </fields>
8736                 <links>
8737                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8738                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8739                 </links>
8740         </class>
8741
8742         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8743                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8744                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8745                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8746                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8747                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8748                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8749                 </fields>
8750                 <links>
8751                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8752                 </links>
8753         </class>
8754
8755         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8756                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8757                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8758                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8759                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8760                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8761                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8762                 </fields>
8763                 <links>
8764                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8765                 </links>
8766         </class>
8767
8768         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8769                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8770                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8771                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8772                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8773                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8774                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8775                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8776                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8777                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8778                 </fields>
8779                 <links>
8780                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8781                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8782                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8783                 </links>
8784         </class>
8785
8786         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8787                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8788                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8789                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8790                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8791                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8792                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8793                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8794                 </fields>
8795                 <links>
8796                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8797                 </links>
8798         </class>
8799
8800         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8801                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8802                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8803                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8804                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8805                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8806                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8807                 </fields>
8808                 <links>
8809                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8810                 </links>
8811         </class>
8812
8813         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8814                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8815                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8816                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8817                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8818                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8819                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8820                 </fields>
8821                 <links>
8822                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8823                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8824                 </links>
8825         </class>
8826
8827         <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">
8828                 <fields oils_persist:primary="id">
8829                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8830                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8831                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8832                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8833                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8834                 </fields>
8835                 <links>
8836                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8837                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8838                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8839                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8840                 </links>
8841         </class>
8842
8843         <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">
8844                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8845                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8846                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8847                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8848                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8849                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8850                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8851                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8852                 </fields>
8853                 <links/>
8854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8855                         <actions>
8856                                 <retrieve/>
8857                         </actions>
8858                 </permacrud>
8859         </class>
8860
8861         <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">
8862                 <fields oils_persist:primary="ptype_key">
8863                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8864                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8865                 </fields>
8866                 <links/>
8867                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8868                         <actions>
8869                                 <retrieve/>
8870                         </actions>
8871                 </permacrud>
8872         </class>
8873
8874         <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">
8875                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8876                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8877                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8878                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8879                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8880                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8881                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8882                 </fields>
8883                 <links>
8884                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8885                 </links>
8886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8887                         <actions>
8888                                 <retrieve/>
8889                         </actions>
8890                 </permacrud>
8891         </class>
8892
8893         <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">
8894                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8896                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8897                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8898                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8899                 </fields>
8900                 <links>
8901                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8902                 </links>
8903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8904                         <actions>
8905                                 <retrieve/>
8906                         </actions>
8907                 </permacrud>
8908         </class>
8909
8910         <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">
8911                 <fields oils_persist:primary="code">
8912                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8913                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8914                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8915                 </fields>
8916                 <links/>
8917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8918                         <actions>
8919                                 <retrieve/>
8920                         </actions>
8921                 </permacrud>
8922         </class>
8923
8924         <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">
8925                 <oils_persist:source_definition>
8926
8927             SELECT  b.id,
8928                     MAX(dcp.edit_date) AS last_delete_date
8929              FROM   biblio.record_entry b
8930                     JOIN asset.call_number cn ON (cn.record = b.id)
8931                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8932              WHERE  NOT b.deleted
8933              GROUP BY b.id
8934              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8935
8936                 </oils_persist:source_definition>
8937                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8938                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8939                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8940                 </fields>
8941                 <links>
8942                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8943                 </links>
8944                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8945                         <actions>
8946                                 <retrieve/>
8947                         </actions>
8948                 </permacrud>
8949         </class>
8950
8951         <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">
8952                 <oils_persist:source_definition>
8953
8954             -- -- 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.
8955             -- -- 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
8956             -- -- may not.
8957             -- SELECT
8958             --     bre.id AS "bib_id",
8959             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8960             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8961             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8962             -- FROM (
8963                 SELECT
8964                     y.bre AS "id",
8965                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8966                     y.hold_count AS "hold_count",
8967                     (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"
8968                 FROM (
8969                         SELECT
8970                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8971                             COUNT(*) AS "hold_count"
8972                         FROM action.hold_request h
8973                         WHERE
8974                             cancel_time IS NULL
8975                             AND fulfillment_time IS NULL
8976                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8977                         GROUP BY 1
8978                     )y LEFT JOIN (
8979                         SELECT 
8980                             (SELECT id
8981                                 FROM biblio.record_entry 
8982                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8983                             ) AS "bre", 
8984                             COUNT(*) AS "copy_count"
8985                         FROM asset.copy
8986                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8987                         WHERE copy.holdable 
8988                             AND NOT copy.deleted 
8989                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8990                         GROUP BY 1
8991                     )x ON x.bre = y.bre
8992                 -- )z RIGHT JOIN (
8993                 --     SELECT id
8994                 --     FROM biblio.record_entry
8995                 --     WHERE NOT deleted
8996                 -- )bre ON (z.bib_id = bre.id)
8997                 
8998
8999                 </oils_persist:source_definition>
9000                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9001                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9002                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9003                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9004                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9005                 </fields>
9006                 <links>
9007                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9008                 </links>
9009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9010                         <actions>
9011                                 <retrieve/>
9012                         </actions>
9013                 </permacrud>
9014         </class>
9015
9016         <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">
9017                 <oils_persist:source_definition>
9018             SELECT *,
9019                 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,
9020                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9021             FROM
9022                 (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
9023                     FROM
9024                         action.hold_request ahr
9025                         JOIN reporter.hold_request_record rhrr USING (id)
9026                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9027                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9028                     WHERE
9029                         ahr.cancel_time IS NULL
9030                         AND ahr.fulfillment_time IS NULL
9031                     GROUP BY bib_record, pickup_lib
9032                 )x
9033                 JOIN
9034                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9035                     FROM
9036                         action.hold_request ahr
9037                         JOIN reporter.hold_request_record rhrr USING (id)
9038                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9039                     WHERE
9040                         ahr.cancel_time IS NULL
9041                         AND ahr.fulfillment_time IS NULL
9042                     GROUP BY bib_record
9043                 )y
9044                 USING (id)
9045                 </oils_persist:source_definition>
9046                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9047                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9048                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9049                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9050                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9051                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9052                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9053                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9054                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9055                 </fields>
9056                 <links>
9057                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9058                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9059                 </links>
9060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9061                         <actions>
9062                                 <retrieve/>
9063                         </actions>
9064                 </permacrud>
9065         </class>
9066
9067         <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">
9068                 <oils_persist:source_definition>
9069             SELECT
9070                 ac.id,
9071                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9072                 MAX(actac.xact_start) AS last_circ
9073             FROM asset.copy ac
9074                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9075             GROUP BY ac.id
9076
9077             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9078             --SELECT
9079             --    ac.id,
9080             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9081             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9082             --FROM asset.copy ac
9083             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9084             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9085             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9086                 </oils_persist:source_definition>
9087                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9088                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9089                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9090                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9091                 </fields>
9092                 <links>
9093                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9094                 </links>
9095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9096                         <actions>
9097                                 <retrieve/>
9098                         </actions>
9099                 </permacrud>
9100         </class>
9101
9102         <!-- ********************************************************************************************************************* -->
9103         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9104         <!-- ********************************************************************************************************************* -->
9105         <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">
9106                 <fields oils_persist:primary="id">
9107                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9108                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9109                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9110                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9111                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9112                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9113                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9114                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9115                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9116                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9117                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9118                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9119                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9120                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9121                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9122                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9123                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9124                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9125                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9126                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9127                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9128                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9129                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9130                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9131                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9132                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9133                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9134                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9135                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9136                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9137                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9138                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9139                 </fields>
9140                 <links>
9141                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9142                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9143                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9144                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9145                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9146                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9147                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9148                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9149                 </links>
9150         </class>
9151
9152         <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">
9153                 <fields oils_persist:primary="id">
9154                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9155                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9156                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9157                 </fields>
9158                 <links>
9159                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9160                 </links>
9161         </class>
9162
9163         <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">
9164                 <fields oils_persist:primary="id">
9165                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9166                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9167                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9168                 </fields>
9169                 <links>
9170                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9171                 </links>
9172         </class>
9173
9174         <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">
9175                 <fields oils_persist:primary="id">
9176                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9177
9178                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9179                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9180                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9181
9182                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9183                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9184                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9185
9186                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9187                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9188
9189                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9190                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9191                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9192
9193                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9194                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9195
9196                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9197                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9198                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9199
9200                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9201                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9202                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9203
9204                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9205                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9206                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9207                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9208
9209                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9210                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9211
9212                 </fields>
9213                 <links>
9214                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9215                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9216                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9217                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9218                 </links>
9219         </class>
9220
9221         <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">
9222                 <oils_persist:source_definition>
9223
9224             SELECT
9225                 po.ordering_agency AS ordering_agency,
9226                 po.id AS purchase_order,
9227                 li.id AS lineitem,
9228                 lid.id AS lineitem_detail,
9229                 cpa.id AS claim_policy_action
9230             FROM
9231                 acq.lineitem_detail lid
9232                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9233                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9234                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9235                 JOIN acq.claim_policy_action cpa ON (
9236                     cpa.claim_policy = cp.id
9237
9238                     -- we only care about claim policy actions whose claim
9239                     -- interval we'd reached or exceeded
9240                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9241
9242                     -- filter out all claim policy actions where claim events
9243                     -- have occurred on or after the action's action_interval
9244                     AND NOT EXISTS (
9245                         SELECT 1
9246                         FROM
9247                             acq.claim_event evt
9248                             JOIN acq.claim claim ON (
9249                                 claim.id = evt.claim
9250                                 AND claim.lineitem_detail = lid.id
9251                             )
9252                         WHERE
9253                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9254                     )
9255                 )
9256             WHERE
9257                 lid.cancel_reason IS NULL
9258                 AND li.cancel_reason IS NULL -- belt/suspenders
9259                 AND po.cancel_reason IS NULL -- belt/suspenders
9260                 AND lid.recv_time IS NULL
9261                 AND po.state = 'on-order'
9262             ORDER BY 1, 2, 3, 4, 5
9263
9264                 </oils_persist:source_definition>
9265                 <fields>
9266                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9267                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9268                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9269                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9270                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9271                 </fields>
9272                 <links>
9273                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9274                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9275                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9276                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9277                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9278                 </links>
9279         </class>
9280
9281         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9282                 <oils_persist:source_definition>
9283
9284             SELECT 
9285                 li.id AS lineitem, 
9286                 (
9287                     SELECT COUNT(lid.id) 
9288                     FROM acq.lineitem_detail lid
9289                     WHERE lineitem = li.id
9290                 ) AS item_count,
9291                 (
9292                     SELECT COUNT(lid.id) 
9293                     FROM acq.lineitem_detail lid
9294                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9295                 ) AS recv_count,
9296                 (
9297                     SELECT COUNT(lid.id) 
9298                     FROM acq.lineitem_detail lid
9299                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9300                 ) AS cancel_count,
9301                 (
9302                     SELECT COUNT(lid.id) 
9303                     FROM acq.lineitem_detail lid
9304                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9305                     WHERE NOT debit.encumbrance AND lineitem = li.id
9306                 ) AS invoice_count,
9307                 (
9308                     SELECT COUNT(DISTINCT(lid.id)) 
9309                     FROM acq.lineitem_detail lid
9310                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9311                     WHERE lineitem = li.id
9312                 ) AS claim_count,
9313                 (
9314                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9315                     FROM acq.lineitem_detail lid
9316                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9317                 ) AS estimated_amount,
9318                 (
9319                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9320                     FROM acq.lineitem_detail lid
9321                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9322                     WHERE debit.encumbrance AND lineitem = li.id
9323                 ) AS encumbrance_amount,
9324                 (
9325                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9326                     FROM acq.lineitem_detail lid
9327                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9328                     WHERE NOT debit.encumbrance AND lineitem = li.id
9329                 ) AS paid_amount
9330
9331                 FROM acq.lineitem AS li
9332         </oils_persist:source_definition>
9333                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9334                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9335                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9336                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9337                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9338                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9339                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9340                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9341                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9342                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9343                 </fields>
9344                 <links>
9345                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9346                 </links>
9347     </class>
9348
9349
9350         <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">
9351                 <oils_persist:source_definition>
9352
9353                         SELECT  t.*
9354                           FROM  action.transit_copy t
9355                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9356                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9357                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9358
9359                 </oils_persist:source_definition>
9360                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9361                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9362                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9363                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9364                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9365                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9366                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9367                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9368                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9369                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9370                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9371                 </fields>
9372                 <links>
9373                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9374                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9375                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9376                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9377                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9378                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9379                 </links>
9380         </class>
9381
9382     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9383                 <oils_persist:source_definition>
9384
9385         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9386                 SELECT
9387                         cp.id as copy,
9388                         COUNT(circ.id),
9389                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9390                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9391                 FROM
9392                         asset.copy cp
9393                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9394                 GROUP BY 1, 3, 4
9395                 UNION
9396                 SELECT
9397                         cp.id as copy,
9398                         COUNT(circ.id),
9399                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9400                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9401                 FROM
9402                         asset.copy cp
9403                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9404                 GROUP BY 1, 3, 4
9405                 UNION
9406                 SELECT
9407                         id as copy,
9408                         circ_count,
9409                         -1 AS year,
9410                         false as is_renewal
9411                 FROM
9412                         extend_reporter.legacy_circ_count
9413         )x GROUP BY 1, 3, 4
9414
9415                 </oils_persist:source_definition>
9416         <fields>
9417             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9418             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9419             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9420             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9421         </fields>
9422                 <links>
9423                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9424                 </links>
9425                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9426                         <actions>
9427                                 <retrieve/>
9428                         </actions>
9429                 </permacrud>
9430     </class>
9431
9432         <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">
9433                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9434                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9435                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9436                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9437                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9438                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9439                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9440                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9441                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9442                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9443                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9444                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9445                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9446                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9447                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9448                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9449                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9450                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9451                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9452                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9453                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9454                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9455                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9456                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9457                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9458                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9459                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9460                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9461                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9462                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9463                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9464                 </fields>
9465                 <links>
9466                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9467                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9468                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9469                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9470                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9471                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9472                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9473                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9474                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9475                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9476                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9477                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9478                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9479                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9480                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9481                 </links>
9482         </class>
9483
9484     <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">
9485         <fields oils_persist:primary="id">
9486             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9487             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9488             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9489             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9490             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9491             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9492             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9493             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9494             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9495             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9496             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9497             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9498             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9499             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9500             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9501             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9502             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9503             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9504             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9505             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9506             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9507             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9508             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9509             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9510             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9511             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9512             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9513             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9514             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9515             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9516             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9517             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9518             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9519             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9520         </fields>
9521         <links>
9522             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9523             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9524             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9525             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9526             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9527         </links>
9528     </class>
9529
9530     <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">
9531         <fields oils_persist:primary="id">
9532             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9533             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9534             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9535             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9536         </fields>
9537         <links>
9538             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9539             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9540         </links>
9541     </class>
9542
9543     <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">
9544         <fields oils_persist:primary="owning_lib">
9545             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9546             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9547             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9548         </fields>
9549         <links>
9550             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9551         </links>
9552     </class>
9553
9554     <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">
9555         <fields oils_persist:primary="id">
9556             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9557             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9558             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9559             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9560             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9561         </fields>
9562         <links>
9563             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9564             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9565             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9566         </links>
9567     </class>
9568
9569     <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">
9570         <fields oils_persist:primary="circ_lib">
9571             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9572             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9573             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9574             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9575         </fields>
9576         <links>
9577             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9578             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9579         </links>
9580     </class>
9581
9582     <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">
9583         <fields oils_persist:primary="id">
9584             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9585             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9586             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9587             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9588             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9589         </fields>
9590         <links>
9591             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9592             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9593             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9594         </links>
9595     </class>
9596
9597     <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">
9598         <fields oils_persist:primary="home_ou">
9599             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9600             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9601             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9602             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9603         </fields>
9604         <links>
9605             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9606             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9607         </links>
9608     </class>
9609         <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">
9610                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9611                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9612                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9613                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9614                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9615                 </fields>
9616                 <links>
9617                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9618                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9619                 </links>
9620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9621                         <actions>
9622                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9623                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9624                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9625                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9626                         </actions>
9627                 </permacrud>
9628         </class>
9629         <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">
9630                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9631                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9632                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9633                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9634                 </fields>
9635                 <links>
9636                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9637                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9638                         </links>
9639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9640                 <actions>
9641                                 <create permission="ADMIN_ACQ_FUND_TAG">
9642                                         <context link="tag" field="owner"/>
9643                                 </create>
9644                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9645                                         <context link="tag" field="owner"/>
9646                                 </retrieve>
9647                                 <update permission="ADMIN_ACQ_FUND_TAG">
9648                                         <context link="tag" field="owner"/>
9649                                 </update>
9650                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9651                                         <context link="tag" field="owner"/>
9652                                 </delete>
9653                         </actions>
9654                 </permacrud>
9655         </class>
9656         <class id="acqmapinv" controller="open-ils.cstore" oils_obj:fieldmapper="acq::map_to_invoice" reporter:label="Acq Map to Invoice View" oils_persist:readonly="true">
9657                 <oils_persist:source_definition><![CDATA[
9658                 SELECT
9659                         poi.purchase_order AS purchase_order,
9660                         ii.invoice AS invoice,
9661                         NULL AS lineitem,
9662                         poi.id AS po_item,
9663                         NULL AS picklist
9664                 FROM
9665                         acq.po_item poi
9666                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
9667                 UNION SELECT
9668                         jub.purchase_order AS purchase_order,
9669                         ie.invoice AS invoice,
9670                         jub.id AS lineitem,
9671                         NULL AS po_item,
9672                         jub.picklist AS picklist
9673                 FROM
9674                         acq.lineitem jub
9675                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
9676                 UNION SELECT
9677                         ii.purchase_order AS purchase_order,
9678                         ii.invoice AS invoice,
9679                         NULL AS lineitem,
9680                         NULL AS po_item,
9681                         NULL AS picklist
9682                 FROM
9683                         acq.invoice_item ii
9684                 WHERE ii.po_item IS NULL
9685                 UNION SELECT
9686                         ie.purchase_order AS purchase_order,
9687                         ie.invoice AS invoice,
9688                         NULL AS lineitem,
9689                         NULL AS po_item,
9690                         NULL AS picklist
9691                 FROM
9692                         acq.invoice_entry ie
9693                 WHERE ie.lineitem IS NULL
9694                 UNION SELECT
9695                         NULL AS purchase_order,
9696                         NULL AS invoice,
9697                         jub.id AS lineitem,
9698                         NULL AS po_item,
9699                         jub.picklist AS picklist
9700                 FROM
9701                         acq.lineitem jub
9702                 WHERE jub.purchase_order IS NULL
9703                 ]]></oils_persist:source_definition>
9704                 <fields>
9705                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
9706                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
9707                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
9708                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
9709                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
9710                 </fields>
9711                 <links>
9712                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
9713                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
9714                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
9715                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
9716                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
9717                 </links>
9718         </class>
9719         <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">
9720                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9721                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9722                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9723                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9724                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9725                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9726                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9727                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9728                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9729                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9730                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9731                 </fields>
9732                 <links>
9733                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9734                 </links>
9735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9736                         <actions>
9737                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9738                                 <retrieve/>
9739                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9740                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9741                         </actions>
9742                 </permacrud>
9743         </class>
9744
9745         <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">
9746                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9747                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9748                         <field name="date_applied" reporter:datatype="timestamp"/>
9749                         <field name="org" reporter:datatype="org_unit"/>
9750                         <field name="original_value" reporter:datatype="text"/>
9751                         <field name="new_value" reporter:datatype="text"/>
9752                         <field name="field_name" reporter:datatype="link"/>
9753                 </fields>
9754                 <links>
9755                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9756                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9757                 </links>
9758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9759                         <actions>
9760                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9761                                 <retrieve/>
9762                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9763                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9764                         </actions>
9765                 </permacrud>
9766         </class>
9767         <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">
9768                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9769                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9770                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9771                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9772                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9773                 </fields>
9774                 <links>
9775                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9776                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
9777                 </links>
9778         </class>
9779         <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">
9780                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9781                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9782                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9783                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9784                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9785                 </fields>
9786                 <links>
9787                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9788                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
9789                 </links>
9790         </class>
9791
9792
9793         <!-- ********************************************************************************************************************* -->
9794
9795 </IDL>
9796
9797 <!--
9798     vim:noet:ts=4:sw=4:
9799 -->