]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Avoid CAPTURE-blocked holds in pull list (IDL view)
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
152                 </fields>
153                 <links>
154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
155                 </links>
156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
157                         <actions>
158                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
159                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
160                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
161                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
162                         </actions>
163                 </permacrud>
164         </class>
165
166         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
167                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
168                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
169                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
170                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
171                 </fields>
172                 <links>
173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
174                 </links>
175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
176                         <actions>
177                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
181                         </actions>
182                 </permacrud>
183         </class>
184
185         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
186                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
187                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
188                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
189                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
190                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
191                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
192                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
193                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
194                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
195                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
196                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
197                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
198                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
199                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
200                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
201                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
202                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
203                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
204                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
205                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
206                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
207                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
208                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
209                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
210                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
211                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
212                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
213                 </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" oils_persist:i18n="true"/>
790                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
791                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
792                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
793             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
794                 </fields>
795                 <links>
796                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
797                 </links>
798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
799             <actions>
800                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
801                 <retrieve/>
802                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
803                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
804             </actions>
805         </permacrud>
806         </class>
807
808         <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">
809                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
810                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
811                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
812                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
813                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
814                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
815                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
816                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
817                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
818                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
819                 </fields>
820                 <links>
821                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
822                 </links>
823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824             <actions>
825                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
826                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
827                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
828                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
829             </actions>
830         </permacrud>
831         </class>
832
833     <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">
834         <fields oils_persist:primary="name">
835             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
836             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
837             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
838             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
839             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
840             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
841             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
842             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
843             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
844             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
845         </fields>
846         <links>
847             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
848             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
849         </links>
850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
851             <actions>
852                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
853                 <retrieve/>
854                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
855                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
856             </actions>
857         </permacrud>
858     </class>
859
860     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
861         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
862             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
863             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
864             <field reporter:label="Name" name="name" reporter:datatype="text"/>
865             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
866             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
867             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
868             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
869         </fields>
870         <links>
871             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
872         </links>
873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
874             <actions>
875                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
876                 <retrieve/>
877                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
878                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
879             </actions>
880         </permacrud>
881     </class>
882
883         <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">
884                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
885                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
886                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
887                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
888                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
889                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
890                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
891                 </fields>
892                 <links>
893             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
894             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
895                 </links>
896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897                         <actions>
898                                 <retrieve/>
899                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
900                         </actions>
901                 </permacrud>
902         </class>
903
904         <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">
905                 <fields oils_persist:primary="key">
906                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
907                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
908                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
909                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
910                 </fields>
911                 <links/>
912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
913                         <actions>
914                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
915                                 <retrieve/>
916                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
917                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
918                         </actions>
919                 </permacrud>
920         </class>
921
922         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
923                 <fields oils_persist:primary="module">
924                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
925                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
926                 </fields>
927                 <links/>
928         </class>
929
930         <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">
931                 <fields oils_persist:primary="module">
932                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
933                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
934                 </fields>
935                 <links/>
936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937                         <actions>
938                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
939                                 <retrieve/>
940                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
941                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
942                         </actions>
943                 </permacrud>
944         </class>
945
946         <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">
947                 <fields oils_persist:primary="module">
948                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
949                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
950                 </fields>
951                 <links/>
952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
953                         <actions>
954                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
955                                 <retrieve/>
956                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
957                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
958                         </actions>
959                 </permacrud>
960         </class>
961
962         <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">
963                 <fields oils_persist:primary="module">
964                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
965                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
966                 </fields>
967                 <links/>
968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
969                         <actions>
970                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
971                                 <retrieve/>
972                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
973                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
974                         </actions>
975                 </permacrud>
976         </class>
977
978         <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">
979                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
980                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
981                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
982                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
983                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
984                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
985                 </fields>
986                 <links>
987                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
988                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
989                 </links>
990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
991                         <actions>
992                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
993                     <context link="event_def" field="owner"/>
994                 </create>
995                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
996                     <context link="event_def" field="owner"/>
997                 </retrieve>
998                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
999                     <context link="event_def" field="owner"/>
1000                 </update>
1001                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1002                     <context link="event_def" field="owner"/>
1003                 </delete>
1004                         </actions>
1005                 </permacrud>
1006         </class>
1007
1008         <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">
1009                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1010                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1011                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1012                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1013                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1014                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1015                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1016                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1017                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1018                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1019                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1020                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1021                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1022                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1023                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1024                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1025                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1026                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1027                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1028                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1029                 </fields>
1030                 <links>
1031                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1032                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1033                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1034                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1035                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1036                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1037                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1038                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1039                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1040                 </links>
1041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1042                         <actions>
1043                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1044                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1045                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1046                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1047                         </actions>
1048                 </permacrud>
1049         </class>
1050
1051         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1052                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1053                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1054                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1055                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1056                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1057                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1058                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1059                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1060                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1061                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1062                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1063                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1064                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1065                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1066                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1067                 </fields>
1068                 <links>
1069                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1070                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1071                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1072                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1073                 </links>
1074         </class>
1075
1076         <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">
1077                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1078                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1079                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1080                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1081                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1082                 </fields>
1083                 <links>
1084                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1085                 </links>
1086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1087                         <actions>
1088                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1089                     <context link="event_def" field="owner"/>
1090                 </create>
1091                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1092                     <context link="event_def" field="owner"/>
1093                 </retrieve>
1094                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1095                     <context link="event_def" field="owner"/>
1096                 </update>
1097                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1098                     <context link="event_def" field="owner"/>
1099                 </delete>
1100                         </actions>
1101                 </permacrud>
1102         </class>
1103
1104         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1105                 <oils_persist:source_definition><![CDATA[
1106                 SELECT  atevdef.hook,
1107                         atevdef.name,
1108                         atevdef.reactor,
1109                         atev.id,
1110                         atev.event_def,
1111                         atev.add_time,
1112                         atev.run_time,
1113                         atev.start_time,
1114                         atev.update_time,
1115                         atev.complete_time,
1116                         atev.update_process,
1117                         atev.state,
1118                         atev.user_data,
1119                         atev.template_output,
1120                         atev.error_output,
1121                         atev.async_output,
1122                         targ_circ.id AS target_circ,
1123                         targ_ahr.id AS target_hold,
1124                         COALESCE(
1125                                 targ_circ.circ_lib,
1126                                 targ_ahr.pickup_lib
1127                         ) AS perm_lib
1128                 FROM action_trigger.event atev
1129                 JOIN action_trigger.event_definition atevdef ON
1130                         (atevdef.id = atev.event_def)
1131                 JOIN action_trigger.hook ath ON
1132                         (ath.key = atevdef.hook)
1133                 LEFT JOIN action.circulation targ_circ ON
1134                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1135                 LEFT JOIN action.hold_request targ_ahr ON
1136                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1137                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1138                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1139                                 'circ.staff.max_visible_event_age',
1140                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1141                         ) UNION
1142                         SELECT '1000 YEARS'::INTERVAL AS value
1143                 ) ous)
1144                 ]]></oils_persist:source_definition>
1145                 <fields oils_persist:primary="id">
1146                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1147                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1148                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1149                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1150                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1151                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1152                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1153                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1154                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1155                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1156                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1157                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1158                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1159                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1160                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1161                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1162                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1163                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1164                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1165                 </fields>
1166                 <links>
1167                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1168                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1169                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1170                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1171                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1172                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1173                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1174                 </links>
1175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1176                         <actions>
1177                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1178                         </actions>
1179                 </permacrud>
1180         </class>
1181
1182         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1183                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1184                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1185                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1186                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1187                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1188                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1189                 </fields>
1190                 <links>
1191                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1192                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1193                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1194                 </links>
1195         </class>
1196
1197         <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">
1198                 <fields oils_persist:primary="code">
1199                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1200                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1201                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1202                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1203                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1204                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1205                 </fields>
1206                 <links/>
1207         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1208             <actions>
1209                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1210                 <retrieve/>
1211                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1212                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1213             </actions>
1214         </permacrud>
1215         </class>
1216
1217         <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">
1218                 <fields oils_persist:primary="code">
1219                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1220                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1221                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1222                 </fields>
1223                 <links/>
1224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1225             <actions>
1226                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1227                 <retrieve/>
1228                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1229                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1230             </actions>
1231         </permacrud>
1232         </class>
1233
1234         <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">
1235                 <fields oils_persist:primary="code">
1236                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1237                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1238                 </fields>
1239                 <links/>
1240         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1241             <actions>
1242                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1243                 <retrieve/>
1244                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1245                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1246             </actions>
1247         </permacrud>
1248         </class>
1249
1250         <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">
1251                 <fields oils_persist:primary="code">
1252                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1253                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1254                 </fields>
1255                 <links/>
1256         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1257             <actions>
1258                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1259                 <retrieve/>
1260                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1261                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1262             </actions>
1263         </permacrud>
1264         </class>
1265
1266         <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">
1267                 <fields oils_persist:primary="code">
1268                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1269                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1270                 </fields>
1271                 <links/>
1272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1273             <actions>
1274                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1275                 <retrieve/>
1276                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1277                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1278             </actions>
1279         </permacrud>
1280         </class>
1281
1282         <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">
1283                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1284                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1285                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1286                 </fields>
1287                 <links/>
1288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1289             <actions>
1290                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1291                 <retrieve/>
1292                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1293                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1294             </actions>
1295         </permacrud>
1296         </class>
1297
1298         <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">
1299                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1300                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1301                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1302                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1303                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1304                 </fields>
1305         <links>
1306             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1307             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1308             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1309         </links>
1310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1311             <actions>
1312                 <create permission="UPDATE_COPY">
1313                     <context link="target_copy" field="circ_lib"/>
1314                 </create>
1315                 <retrieve/>
1316                 <update permission="UPDATE_COPY">
1317                     <context link="target_copy" field="circ_lib"/>
1318                 </update>
1319                 <delete permission="UPDATE_COPY">
1320                     <context link="target_copy" field="circ_lib"/>
1321                 </delete>
1322             </actions>
1323         </permacrud>
1324         </class>
1325
1326         <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">
1327                 <fields oils_persist:primary="code">
1328                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1329                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1330                 </fields>
1331                 <links/>
1332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1333             <actions>
1334                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1335                 <retrieve/>
1336                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1337                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1338             </actions>
1339         </permacrud>
1340         </class>
1341
1342         <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">
1343                 <fields oils_persist:primary="code">
1344                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1345                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1346                 </fields>
1347                 <links/>
1348         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1349             <actions>
1350                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1351                 <retrieve/>
1352                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1353                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1354             </actions>
1355         </permacrud>
1356         </class>
1357
1358         <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">
1359                 <fields oils_persist:primary="code">
1360                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1361                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1362                 </fields>
1363                 <links/>
1364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1365             <actions>
1366                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1367                 <retrieve/>
1368                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1369                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1370             </actions>
1371         </permacrud>
1372         </class>
1373
1374     <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">
1375         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1376             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1377             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1378             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1379             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1380             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1381             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1382             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1383             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1384             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1385             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1386             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1387             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1388             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1389             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1390             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1391             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1392             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1393         </fields>
1394         <links/>
1395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1396             <actions>
1397                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1398                 <retrieve/>
1399                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1400                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1401             </actions>
1402         </permacrud>
1403     </class>
1404
1405     <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">
1406         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1407             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1408             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1409             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1410             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1411             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1412             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1413             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1414             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1415             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1416             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1417             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1418             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1419             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1420             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1421             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1422             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1423             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1424             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1425             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1426         </fields>
1427         <links/>
1428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1429             <actions>
1430                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1431                 <retrieve/>
1432                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1433                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1434             </actions>
1435         </permacrud>
1436     </class>
1437
1438     <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">
1439         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1440             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1441             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1442             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1443             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1444             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1445         </fields>
1446         <links>
1447             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1448             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1449             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1450         </links>
1451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1452             <actions>
1453                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1454                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1455                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1456                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1457             </actions>
1458         </permacrud>
1459     </class>
1460
1461         <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">
1462                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1463                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1464                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1465                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1466                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1467                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1468                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1469                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1470                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1471                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1472                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1473                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1474                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1475                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1476                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1477                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1478                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1479             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1480                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1481                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1482                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1483                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1484                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1485                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1486                 </fields>
1487                 <links>
1488                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1489                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1490                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1491                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1492                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1493                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1494                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1495                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1496                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1497                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1498                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1499                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1500                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1501             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1502                 </links>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1506                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1507                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1508                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1509             </actions>
1510         </permacrud>
1511         </class>
1512
1513         <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">
1514                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1515                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1516                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1517                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1518                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1519                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1520                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1521                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1522                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1523                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1524                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1525                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1526                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1527                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1528                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1529                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1530             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1531                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1532                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1533             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1534                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1535                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1536                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1537                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1538             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1539             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1540             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1541                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1542                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1543                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1544                 </fields>
1545                 <links>
1546                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1547                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1548                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1549                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1550                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1551                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1552                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1553                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1554                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1555                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1556                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1557                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1558                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1559                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1560             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1561                 </links>
1562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1563             <actions>
1564                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1565                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1566                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1567                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1568             </actions>
1569         </permacrud>
1570         </class>
1571
1572     <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">
1573         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1574             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1575             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1576             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1577         </fields>
1578         <links/>
1579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1580             <actions>
1581                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1582                 <retrieve/>
1583                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1584                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1585             </actions>
1586         </permacrud>
1587     </class>
1588
1589     <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">
1590         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1591             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1592             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1593             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1594             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1595             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1596             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1597             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1598         </fields>
1599         <links>
1600             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1601         </links>
1602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1603             <actions>
1604                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1605                 <retrieve/>
1606                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1607                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1608             </actions>
1609         </permacrud>
1610     </class>
1611
1612     <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">
1613         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1614             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1615             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1616             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1617             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1618             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1619         </fields>
1620         <links>
1621             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1622             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1623         </links>
1624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1625             <actions>
1626                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1627                     <context link="matchpoint" field="org_unit"/>
1628                 </create>
1629                 <retrieve/>
1630                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1631                     <context link="matchpoint" field="org_unit"/>
1632                 </update>
1633                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1634                     <context link="matchpoint" field="org_unit"/>
1635                 </delete>
1636             </actions>
1637         </permacrud>
1638     </class>
1639
1640     <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">
1641         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1642             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1643             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1644             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1645         </fields>
1646         <links>
1647             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1648             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1649         </links>
1650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1651             <actions>
1652                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1653                     <context link="limit_set" field="owning_lib"/>
1654                 </create>
1655                 <retrieve/>
1656                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1657                     <context link="limit_set" field="owning_lib"/>
1658                 </update>
1659                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1660                     <context link="limit_set" field="owning_lib"/>
1661                 </delete>
1662             </actions>
1663         </permacrud>
1664     </class>
1665     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
1666         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1667             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1668             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1669             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1670         </fields>
1671         <links>
1672             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1673             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1674         </links>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1678                     <context link="limit_set" field="owning_lib"/>
1679                 </create>
1680                 <retrieve/>
1681                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1682                     <context link="limit_set" field="owning_lib"/>
1683                 </update>
1684                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1685                     <context link="limit_set" field="owning_lib"/>
1686                 </delete>
1687             </actions>
1688         </permacrud>
1689     </class>
1690
1691     <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">
1692         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1693             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1694             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1695             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1696             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1697         </fields>
1698         <links>
1699             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1700             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1701         </links>
1702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1703             <actions>
1704                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1705                     <context link="limit_set" field="owning_lib"/>
1706                 </create>
1707                 <retrieve/>
1708                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1709                     <context link="limit_set" field="owning_lib"/>
1710                 </update>
1711                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1712                     <context link="limit_set" field="owning_lib"/>
1713                 </delete>
1714             </actions>
1715         </permacrud>
1716     </class>
1717
1718         <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">
1719                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1720                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1721                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1722                 </fields>
1723                 <links/>
1724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1725             <actions>
1726                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1727                 <retrieve/>
1728                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1729                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1730             </actions>
1731         </permacrud>
1732         </class>
1733
1734         <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">
1735                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1736                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1737                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1738                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1739                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1740                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1741                 </fields>
1742                 <links>
1743                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1744                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1745                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1746                 </links>
1747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1748             <actions>
1749                 <create permission="ADMIN_SURVEY">
1750                     <context link="survey" field="owner"/>
1751                 </create>
1752                 <retrieve/>
1753                 <update permission="ADMIN_SURVEY">
1754                     <context link="survey" field="owner"/>
1755                 </update>
1756                 <delete permission="ADMIN_SURVEY">
1757                     <context link="survey" field="owner"/>
1758                 </delete>
1759             </actions>
1760         </permacrud>
1761         </class>
1762         <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">
1763                 <fields oils_persist:primary="id" oils_persist:sequence="">
1764                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1765                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1766                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1767                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1768                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1769                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1770                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1771                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1772                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1773                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1774                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1775                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1776                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1777                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1778                 </fields>
1779                 <links>
1780                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1781                 </links>
1782         </class>
1783         <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">
1784                 <fields oils_persist:primary="id" oils_persist:sequence="">
1785                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1786                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1787                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1788                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1789                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1790                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1791                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1792                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1793                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1794                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1795                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1796                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1797                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1798                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1799                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1800                 </fields>
1801                 <links>
1802                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1803                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1804                 </links>
1805         </class>
1806         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1807                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1808                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1809                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1810                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1811                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1812                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1813                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1814                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1815                 </fields>
1816                 <links>
1817                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1818                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1819                 </links>
1820         </class>
1821         <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">
1822                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1823                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1824                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1825                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1826                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1827                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1828                 </fields>
1829                 <links>
1830                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1831                 </links>
1832         </class>
1833         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1834                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1835                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1836                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1837                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1838                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1839                 </fields>
1840                 <links>
1841                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1842                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1843                 </links>
1844         </class>
1845         <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">
1846                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1847                         <field name="field" reporter:datatype="link"/>
1848                         <field name="id" reporter:datatype="id" />
1849                         <field name="source" reporter:datatype="link"/>
1850                         <field name="value" reporter:datatype="text"/>
1851                 </fields>
1852                 <links>
1853                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1854                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1855                 </links>
1856         </class>
1857         <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">
1858                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1859                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1860                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1861                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1862                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1863                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1864                 </fields>
1865                 <links>
1866                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1867                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1868                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1869                 </links>
1870         </class>
1871         <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">
1872                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1873                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1874                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1875                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1876                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1877                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1878                 </fields>
1879                 <links>
1880                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1881                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1882                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1883                 </links>
1884         </class>
1885         <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">
1886                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1887                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1888                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1889                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1890                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1891                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1892                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1893                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1894                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1895                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1896                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1897                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1898                 </fields>
1899                 <links>
1900                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1901                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1902                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1903                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1904                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1905                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1906                 </links>
1907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1908             <actions>
1909                 <create permission="TRANSIT_COPY" context_field="owner">
1910                     <context link="target_copy" field="circ_lib"/>
1911                 </create>
1912                 <retrieve/>
1913                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1914                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1915             </actions>
1916         </permacrud>
1917         </class>
1918         <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">
1919                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1920                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1921                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1922                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1923                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1924                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1925                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1926                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1927                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1928                 </fields>
1929                 <links>
1930                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1931                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1932                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1933                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1934                 </links>
1935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1936             <actions>
1937                 <create permission="ADMIN_SURVEY">
1938                     <context link="survey" field="owner"/>
1939                 </create>
1940                 <retrieve/>
1941                 <update permission="ADMIN_SURVEY">
1942                     <context link="survey" field="owner"/>
1943                 </update>
1944                 <delete permission="ADMIN_SURVEY">
1945                     <context link="survey" field="owner"/>
1946                 </delete>
1947             </actions>
1948         </permacrud>
1949         </class>
1950         <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">
1951                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1952                         <field name="bucket" />
1953                         <field name="id" reporter:datatype="id" />
1954                         <field name="target_copy" reporter:datatype="link"/>
1955                         <field name="create_time" reporter:datatype="timestamp" />
1956                         <field name="pos" reporter:datatype="int" />
1957                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1958                 </fields>
1959                 <links>
1960                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1961                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1962             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1963                 </links>
1964         </class>
1965         <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">
1966                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1967                         <field name="id" reporter:datatype="id" />
1968                         <field name="item" reporter:datatype="link"/>
1969                         <field name="note" reporter:datatype="text" />
1970                 </fields>
1971                 <links>
1972                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1973                 </links>
1974         </class>
1975
1976         <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">
1977                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1978                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1979                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1980                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1981                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1982                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1983                 </fields>
1984                 <links>
1985                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1986                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1987                 </links>
1988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1989                         <actions>
1990                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1991                                 <retrieve/>
1992                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1993                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1994                         </actions>
1995                 </permacrud>
1996         </class>
1997
1998         <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">
1999                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2000                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2001                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2002                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2003                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2004                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2005                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2006                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2007                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2008                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2009                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2010                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2011                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2012                 </fields>
2013                 <links>
2014                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2015                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2016                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2017                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2018                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2019                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2020                 </links>
2021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022                         <actions>
2023                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2024                                 <retrieve/>
2025                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2026                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2027                         </actions>
2028                 </permacrud>
2029         </class>
2030
2031         <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">
2032                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2033                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2034                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2035                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2036                 </fields>
2037                 <links>
2038                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2039                 </links>
2040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2041                         <actions>
2042                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2043                                 <retrieve/>
2044                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2045                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2046                         </actions>
2047                 </permacrud>
2048         </class>
2049
2050         <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">
2051                 <fields oils_persist:primary="code">
2052                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2053                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2054                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2055                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2056                 </fields>
2057                 <links>
2058                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2059                 </links>
2060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2061                         <actions>
2062                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2063                                 <retrieve/>
2064                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2065                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2066                         </actions>
2067                 </permacrud>
2068         </class>
2069
2070         <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">
2071                 <fields oils_persist:primary="code">
2072                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2073                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2074                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2075                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2076                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2077                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2078                 </fields>
2079                 <links>
2080                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2081                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2082                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2083                 </links>
2084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2085                         <actions>
2086                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2087                                 <retrieve/>
2088                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2089                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2090                         </actions>
2091                 </permacrud>
2092         </class>
2093
2094     <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">
2095         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2096             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2097             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2098             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2099         </fields>
2100         <links>
2101             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2102             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2103         </links>
2104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2105             <actions>
2106                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2107                 <retrieve/>
2108                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2109                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2110             </actions>
2111         </permacrud>
2112     </class>
2113
2114         <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">
2115                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2116                         <field name="active" reporter:datatype="bool"/>
2117                         <field name="create_date" reporter:datatype="timestamp"/>
2118                         <field name="creator" />
2119                         <field name="deleted" reporter:datatype="bool"/>
2120                         <field name="edit_date" reporter:datatype="timestamp"/>
2121                         <field name="editor" />
2122                         <field name="id" reporter:datatype="id" />
2123                         <field name="last_xact_id" />
2124                         <field name="marc" />
2125                         <field name="source" />
2126                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2127                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2128                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2129                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2130                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2131                 </fields>
2132                 <links>
2133                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2134                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2135                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2136                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2137                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2138                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2139                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2140                 </links>
2141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2142                         <actions>
2143                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2144                                 <retrieve/>
2145                                 <update permission="UPDATE_MARC" global_required="true"/>
2146                                 <delete permission="UPDATE_MARC" global_required="true"/>
2147                         </actions>
2148                 </permacrud>
2149         </class>
2150         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2151                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2152                         <field name="char_encoding" />
2153                         <field name="id" />
2154                         <field name="record" />
2155                         <field name="record_status" />
2156                         <field name="thesaurus" />
2157                 </fields>
2158                 <links>
2159                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2160                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2161                 </links>
2162         </class>
2163         <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">
2164                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2165                         <field name="id" reporter:datatype="id" />
2166                         <field name="bib" reporter:datatype="link" />
2167                         <field name="authority" reporter:datatype="link" />
2168                 </fields>
2169                 <links>
2170                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2171                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2172                 </links>
2173         </class>
2174         <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">
2175                 <fields oils_persist:primary="code" oils_persist:sequence="">
2176                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2177                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2178                 </fields>
2179                 <links/>
2180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2181             <actions>
2182                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2183                 <retrieve/>
2184                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2185                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2186             </actions>
2187         </permacrud>
2188         </class>
2189         <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">
2190                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2191                         <field name="accepting_usr" />
2192                         <field name="amount" reporter:datatype="money" />
2193                         <field name="amount_collected" reporter:datatype="money" />
2194                         <field name="approval_code" reporter:datatype="text"/>
2195                         <field name="cash_drawer" reporter:datatype="link"/>
2196                         <field name="cc_first_name" reporter:datatype="text"/>
2197                         <field name="cc_last_name" reporter:datatype="text"/>
2198                         <field name="cc_number" reporter:datatype="text"/>
2199                         <field name="cc_order_number" reporter:datatype="text"/>
2200                         <field name="cc_type" reporter:datatype="text"/>
2201                         <field name="cc_processor" reporter:datatype="text"/>
2202                         <field name="expire_month" reporter:datatype="int" />
2203                         <field name="expire_year" reporter:datatype="int" />
2204                         <field name="id" reporter:datatype="id" />
2205                         <field name="note" reporter:datatype="text"/>
2206                         <field name="payment_ts" reporter:datatype="timestamp"/>
2207                         <field name="xact" reporter:datatype="link"/>
2208                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2209                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2210                 </fields>
2211                 <links>
2212                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2213                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2214                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2215                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2216                 </links>
2217         </class>
2218         <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">
2219                 <fields oils_persist:primary="name">
2220                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2221                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2222                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2223                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2224                 </fields>
2225                 <links/>
2226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2227             <actions>
2228                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2229                 <retrieve/>
2230                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2231                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2232             </actions>
2233         </permacrud>
2234         </class>
2235
2236         <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">
2237                 <fields oils_persist:primary="alias">
2238                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2239                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2240                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2241                 </fields>
2242                 <links>
2243                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2244                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2245                 </links>
2246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2247             <actions>
2248                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2249                 <retrieve/>
2250                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2251                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2252             </actions>
2253         </permacrud>
2254         </class>
2255
2256         <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">
2257                 <fields oils_persist:primary="name">
2258                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2259                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2260                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2261                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2262                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2263                 </fields>
2264                 <links>
2265                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2266                 </links>
2267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2268             <actions>
2269                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2270                 <retrieve/>
2271                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2272                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2273             </actions>
2274         </permacrud>
2275         </class>
2276
2277         <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">
2278                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2279                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2280                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2281                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2282                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2283                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2284                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2285                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2286                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2287                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2288                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2289                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2290                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2291                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2292                 </fields>
2293                 <links>
2294                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2295                 </links>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2299                 <retrieve/>
2300                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2301                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2302             </actions>
2303         </permacrud>
2304         </class>
2305         <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">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2307                         <field name="id" reporter:datatype="id" />
2308                         <field name="name" reporter:datatype="text"/>
2309                         <field name="xpath" reporter:datatype="text"/>
2310                         <field name="format" reporter:datatype="link"/>
2311                         <field name="first_word" reporter:datatype="bool" />
2312                 </fields>
2313                 <links/>
2314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2315             <actions>
2316                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2317                 <retrieve/>
2318                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2319                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <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">
2324                 <fields oils_persist:primary="code" oils_persist:sequence="">
2325                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2326                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2327                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2328                 </fields>
2329                 <links/>
2330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2331             <actions>
2332                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2333                 <retrieve/>
2334                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2335                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2336             </actions>
2337         </permacrud>
2338         </class>
2339         <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">
2340                 <fields oils_persist:primary="code" oils_persist:sequence="">
2341                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2342                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2343                 </fields>
2344                 <links/>
2345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2346             <actions>
2347                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2348                 <retrieve/>
2349                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2350                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2351             </actions>
2352         </permacrud>
2353         </class>
2354     <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">
2355         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2356             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2357             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2358             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2359             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2360         </fields>
2361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2362             <actions>
2363                 <retrieve/>
2364             </actions>
2365         </permacrud>
2366     </class>
2367         <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">
2368                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2369                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2370                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2371                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2372                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2373                 </fields>
2374                 <links>
2375                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2376                 </links>
2377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2378             <actions>
2379                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2380                 <retrieve/>
2381                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2382                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2383             </actions>
2384         </permacrud>
2385         </class>
2386         <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">
2387                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2388                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2389                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2390                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2391                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2392                 </fields>
2393                 <links>
2394                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2395                 </links>
2396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2397             <actions>
2398                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2399                 <retrieve/>
2400                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2401                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2402             </actions>
2403         </permacrud>
2404         </class>
2405         <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">
2406                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2407                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2408                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2409                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2410                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2411                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2412                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2413                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2414                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2415                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2416                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2417                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2418                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2419                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2420                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2421                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2422                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2423                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2424                 </fields>
2425                 <links>
2426                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2427                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2428                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2429                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2430                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2431                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2432                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2433                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2434                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2435                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2436                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2437                 </links>
2438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2439             <actions>
2440                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2441                 <retrieve/>
2442                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2443                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2444             </actions>
2445         </permacrud>
2446         </class>
2447         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2448                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2449                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2450                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2451                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2452                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2453                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2454                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2455                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2456                 </fields>
2457                 <links>
2458                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2459                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2460         </links>
2461         </class>
2462         <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">
2463                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2464                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2465                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2466                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2467                 </fields>
2468                 <links>
2469                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2470                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2471                 </links>
2472         </class>
2473         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2474                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2475                         <field name="id" reporter:datatype="id" />
2476                         <field name="value" oils_persist:i18n="true" />
2477                 </fields>
2478                 <links/>
2479         </class>
2480         <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">
2481                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2482                         <field name="balance_owed" reporter:datatype="money" />
2483                         <field name="total_owed" reporter:datatype="money" />
2484                         <field name="total_paid" reporter:datatype="money" />
2485                         <field name="usr" reporter:datatype="link"/>
2486                 </fields>
2487                 <links>
2488                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2489         </links>
2490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2491             <actions>
2492                 <retrieve permission="VIEW_USER">
2493                     <context link="usr" field="home_ou"/>
2494                 </retrieve>
2495             </actions>
2496         </permacrud>
2497         </class>
2498         <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">
2499                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2500                         <field name="collector" />
2501                         <field name="enter_time" reporter:datatype="timestamp"/>
2502                         <field name="id" reporter:datatype="id" />
2503                         <field name="location" reporter:datatype="link"/>
2504                         <field name="usr" reporter:datatype="link"/>
2505                 </fields>
2506                 <links>
2507                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2508                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2509                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2510                 </links>
2511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2512             <actions>
2513                 <create permission="money.collections_tracker.create" context_field="location"/>
2514                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2515                 <delete permission="money.collections_tracker.create" context_field="location"/>
2516             </actions>
2517         </permacrud>
2518         </class>
2519         <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">
2520                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2521                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2522                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2523                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2524                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2525                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2526                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2527                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2528                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2529                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2530                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2531                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2532                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2533                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2534                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2535                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2536                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2537                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2538                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2539                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2540                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2541                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2542                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2543                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2544                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2545                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2546                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2547                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2548                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2549                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2550                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2551                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2552                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2553                 </fields>
2554                 <links>
2555                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2556                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2557                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2558                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2559                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2560                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2561                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2562                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2563                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2564                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2565                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2566                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2567                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2568                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2569                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2570                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2571                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2572                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2573                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2574                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2575                 </links>
2576         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2577             <actions>
2578                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2579                 <retrieve/>
2580                 <update permission="UPDATE_MARC" global_required="true"/>
2581             </actions>
2582         </permacrud>
2583         </class>
2584         <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">
2585                 <fields oils_persist:primary="id">
2586                         <field name="dow_0_close" />
2587                         <field name="dow_0_open" />
2588                         <field name="dow_1_close" />
2589                         <field name="dow_1_open" />
2590                         <field name="dow_2_close" />
2591                         <field name="dow_2_open" />
2592                         <field name="dow_3_close" />
2593                         <field name="dow_3_open" />
2594                         <field name="dow_4_close" />
2595                         <field name="dow_4_open" />
2596                         <field name="dow_5_close" />
2597                         <field name="dow_5_open" />
2598                         <field name="dow_6_close" />
2599                         <field name="dow_6_open" />
2600                         <field name="id" reporter:datatype="id" />
2601                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2602                 </fields>
2603                 <links>
2604                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2605                 </links>
2606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2607             <actions>
2608                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2609                 <retrieve/>
2610                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2611                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2612             </actions>
2613         </permacrud>
2614         </class>
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2617                         <field name="id" reporter:datatype="id" />
2618                         <field name="record" reporter:datatype="link"/>
2619                         <field name="label" reporter:datatype="text"/>
2620                         <field name="label_sortkey" reporter:datatype="text"/>
2621                 </fields>
2622                 <links>
2623                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2624                 </links>
2625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2626             <actions>
2627                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2628                 <retrieve/>
2629                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2630                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2631             </actions>
2632         </permacrud>
2633         </class>
2634         <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">
2635                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2636                         <field name="id" reporter:datatype="id" />
2637                         <field name="target_copy" reporter:datatype="link" />
2638                         <field name="part" reporter:datatype="link"/>
2639                 </fields>
2640                 <links>
2641                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2642                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2643                 </links>
2644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2645             <actions>
2646                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2647                 <retrieve/>
2648                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2649                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2650             </actions>
2651         </permacrud>
2652         </class>
2653         <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">
2654                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2655                         <field name="close_end" reporter:datatype="timestamp" />
2656                         <field name="close_start" reporter:datatype="timestamp" />
2657                         <field name="id" reporter:datatype="id" />
2658                         <field name="org_unit" reporter:datatype="org_unit"/>
2659                         <field name="reason" reporter:datatype="text"/>
2660                 </fields>
2661                 <links>
2662                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2663                 </links>
2664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2665             <actions>
2666                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2667                 <retrieve/>
2668                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2669                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2670             </actions>
2671         </permacrud>
2672         </class>
2673         <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">
2674                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2675                         <field name="extended" reporter:datatype="interval"/>
2676                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2677                         <field name="max_renewals" reporter:datatype="int" />
2678                         <field name="name" reporter:datatype="text"/>
2679                         <field name="normal" reporter:datatype="interval"/>
2680                         <field name="shrt" reporter:datatype="interval"/>
2681                 </fields>
2682                 <links>
2683                 </links>
2684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2685             <actions>
2686                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2687                 <retrieve/>
2688                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2689                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2690             </actions>
2691         </permacrud>
2692         </class>
2693
2694         <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">
2695                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2696                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2697                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2698             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2699                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2700             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2701                 </fields>
2702                 <links>
2703             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2704                 </links>
2705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2706             <actions>
2707                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2708                 <retrieve/>
2709                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2710                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2711             </actions>
2712                 </permacrud>
2713         </class>
2714
2715         <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">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2717                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2718                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2719                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2720             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2721                 </fields>
2722                 <links>
2723                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2724                 </links>
2725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2726             <actions>
2727                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2728                 <retrieve/>
2729                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2730                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2731             </actions>
2732                 </permacrud>
2733         </class>
2734
2735         <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">
2736                 <fields oils_persist:primary="id" oils_persist:sequence="">
2737                         <field name="balance_owed" reporter:datatype="money"/>
2738                         <field name="id" reporter:datatype="id" />
2739                         <field name="last_billing_note" reporter:datatype="text"/>
2740                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2741                         <field name="last_billing_type" reporter:datatype="text"/>
2742                         <field name="last_payment_note" reporter:datatype="text"/>
2743                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2744                         <field name="last_payment_type" reporter:datatype="text"/>
2745                         <field name="total_owed" reporter:datatype="money"/>
2746                         <field name="total_paid" reporter:datatype="money"/>
2747                         <field name="usr" reporter:datatype="link"/>
2748                         <field name="xact_finish" reporter:datatype="timestamp" />
2749                         <field name="xact_start" reporter:datatype="timestamp" />
2750                         <field name="xact_type" reporter:datatype="text"/>
2751                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2752                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2753                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2754                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2755                         <field name="billing_location" reporter:datatype="link"/>
2756                 </fields>
2757                 <links>
2758                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2759                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2760                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2761                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2762                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2763                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2764                 </links>
2765         </class>
2766         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2767                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2768                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2769                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2770                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2771                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2772                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2773                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2774                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2775                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2776                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2777                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2778                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2779                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2780                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2781                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2782                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2783                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2784                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2785                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2786                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2787                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2788                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2789                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2790                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2791                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2792                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2793                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2794                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2795                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2796                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2797                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2798                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2799                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2800                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2801                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2802                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2803                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2804                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2805                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2806                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2807                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2808                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2809                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2810                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2811                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2812                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2813                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2814                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2815                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2816                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2817                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2818                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2819                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2820                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2821                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2822                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2823                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2824                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2825                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2826                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2827                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2828                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2829                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2830                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2831                 </fields>
2832                 <links>
2833                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2834                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2835                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2836                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2837                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2838                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2839                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2840                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2841                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2842                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2843                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2844                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2845                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2846                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2847                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2848                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2849                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2850                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2851                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2852                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2853                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2854                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2855                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2856                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2857                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2858                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2859                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2860                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2861                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2862                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2863                 </links>
2864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2865                         <actions>
2866                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
2867                         </actions>
2868                 </permacrud>
2869         </class>
2870         <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">
2871                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2872                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2873                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2874                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2875                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2876                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2877                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2878                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2879                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2880         </fields>
2881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2882                         <actions>
2883                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2884                                 <retrieve/>
2885                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2886                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2887                         </actions>
2888                 </permacrud>
2889         </class>
2890         <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">
2891                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2892                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2893                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2894                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2895                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2896         </fields>
2897         <links>
2898                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2899                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2900                 </links>
2901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2902                         <actions>
2903                                 <retrieve permission="RUN_REPORTS">
2904                                         <context link="usr" field="home_ou" />
2905                                 </retrieve>
2906                         </actions>
2907                 </permacrud>
2908         </class>
2909         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2911                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2912                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2913                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2914                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2915                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2916                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2917         </fields>
2918         <links>
2919                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2920                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2921                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2922                 </links>
2923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2924                         <actions>
2925                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2926                                         <context link="usr" field="home_ou" />
2927                                         <context link="ws" field="owning_lib" />
2928                                 </retrieve>
2929                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2930                                         <context link="usr" field="home_ou" />
2931                                         <context link="ws" field="owning_lib" />
2932                                 </create>
2933                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2934                                         <context link="usr" field="home_ou" />
2935                                         <context link="ws" field="owning_lib" />
2936                                 </update>
2937                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2938                                         <context link="usr" field="home_ou" />
2939                                         <context link="ws" field="owning_lib" />
2940                                 </delete>
2941                         </actions>
2942                 </permacrud>
2943         </class>
2944         <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">
2945                 <fields oils_persist:primary="name">
2946                         <field name="name" reporter:datatype="text"/>
2947                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2948                 </fields>
2949                 <links/>
2950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2951                         <actions>
2952                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2953                                 <retrieve/>
2954                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2955                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2956                         </actions>
2957                 </permacrud>
2958         </class>
2959         <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">
2960                 <fields oils_persist:primary="name">
2961                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2962                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2963                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2964                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2965                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2966                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2967                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2968                 </fields>
2969                 <links>
2970                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2971                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2972                 </links>
2973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2974                         <actions>
2975                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2976                                 <retrieve/>
2977                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2978                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2979                         </actions>
2980                 </permacrud>
2981         </class>
2982         <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">
2983                 <fields oils_persist:primary="name">
2984                         <field name="name" reporter:datatype="text"/>
2985                         <field name="label" reporter:datatype="text"/>
2986                         <field name="description" reporter:datatype="text"/>
2987                         <field name="datatype" reporter:datatype="text"/>
2988                         <field name="view_perm" reporter:datatype="link"/>
2989                         <field name="update_perm" reporter:datatype="link"/>
2990                         <field name="fm_class" reporter:datatype="text"/>
2991                         <field name="grp" reporter:datatype="link"/>
2992                 </fields>
2993                 <links>
2994                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2995                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2996                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2997                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2998                 </links>
2999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3000                         <actions>
3001                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3002                                 <retrieve/>
3003                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3004                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3005                         </actions>
3006                 </permacrud>
3007         </class>
3008         <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">
3009                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3010                         <field name="id" />
3011                         <field name="name"  reporter:datatype="text"/>
3012                         <field name="org_unit" reporter:datatype="org_unit"/>
3013                         <field name="value"  reporter:datatype="text"/>
3014                 </fields>
3015                 <links>
3016                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3017                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3018                 </links>
3019         </class>
3020         <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">
3021                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3022                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3023                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3024                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3025                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3026                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3027                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3028                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3029                 </fields>
3030                 <links>
3031                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3032                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3033                 </links>
3034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3035             <actions>
3036                 <create permission="CREATE_COPY_NOTE">
3037                     <context link="owning_copy" field="circ_lib"/>
3038                 </create>
3039                 <retrieve permission="VIEW_COPY_NOTES">
3040                     <context link="owning_copy" field="circ_lib"/>
3041                 </retrieve>
3042                 <update permission="UPDATE_COPY_NOTE">
3043                     <context link="owning_copy" field="circ_lib"/>
3044                 </update>
3045                 <delete permission="DELETE_COPY_NOTE">
3046                     <context link="owning_copy" field="circ_lib"/>
3047                 </delete>
3048             </actions>
3049         </permacrud>
3050         </class>
3051         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3052                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3053                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3054                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3055                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3056                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3057                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3058                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3059                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3060                 </fields>
3061                 <links>
3062                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3063                 </links>
3064         </class>
3065         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3066                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3067                         <field name="fingerprint"  reporter:datatype="text"/>
3068                         <field name="id" reporter:datatype="id" />
3069                         <field name="master_record" reporter:datatype="link"/>
3070                         <field name="mods"  reporter:datatype="text"/>
3071                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3072                 </fields>
3073                 <links>
3074                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3075                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3076                 </links>
3077         </class>
3078         <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">
3079                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3080                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3081                         <field name="name"  reporter:datatype="text"/>
3082                 </fields>
3083                 <links/>
3084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3085             <actions>
3086                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3087                 <retrieve/>
3088                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3089                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3090             </actions>
3091         </permacrud>
3092         </class>
3093         <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">
3094                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3095                         <field name="code"  reporter:datatype="text"/>
3096                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3097                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3098                 </fields>
3099                 <links/>
3100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3101             <actions>
3102                 <create permission="CREATE_PERM" global_required="true"/>
3103                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3104                 <update permission="UPDATE_PERM" global_required="true"/>
3105                 <delete permission="DELETE_PERM" global_required="true"/>
3106             </actions>
3107         </permacrud>
3108         </class>
3109         <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">
3110                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3111                         <field name="id" reporter:datatype="id" />
3112                         <field name="metarecord" reporter:datatype="link"/>
3113                         <field name="source" reporter:datatype="link"/>
3114                 </fields>
3115                 <links>
3116                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3117                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3118                 </links>
3119         </class>
3120         <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">
3121                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3122                         <field name="id" reporter:datatype="id" />
3123                         <field name="field" reporter:datatype="link"/>
3124                         <field name="source" reporter:datatype="link"/>
3125                         <field name="value"  reporter:datatype="text"/>
3126                 </fields>
3127                 <links>
3128                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3129                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3130                 </links>
3131         </class>
3132         <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">
3133                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3134                         <field name="id" reporter:datatype="id" />
3135                         <field name="value" reporter:datatype="text"/>
3136                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3137                 </fields>
3138                 <links>
3139                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3140                 </links>
3141         </class>
3142         <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">
3143                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3144                         <field name="id" reporter:datatype="id" />
3145                         <field name="entry" reporter:datatype="link"/>
3146                         <field name="def" reporter:datatype="link"/>
3147                         <field name="source" reporter:datatype="link"/>
3148                 </fields>
3149                 <links>
3150                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3151                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3152                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3153                 </links>
3154         </class>
3155         <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">
3156                 <oils_persist:source_definition>
3157                         SELECT * FROM metabib.author_field_entry
3158                                                 UNION ALL
3159                         SELECT * FROM metabib.keyword_field_entry
3160                                                 UNION ALL
3161                         SELECT * FROM metabib.identifier_field_entry
3162                                                 UNION ALL
3163                         SELECT * FROM metabib.title_field_entry
3164                                                 UNION ALL
3165                         SELECT * FROM metabib.subject_field_entry
3166                                                 UNION ALL
3167                         SELECT * FROM metabib.series_field_entry
3168                 </oils_persist:source_definition>
3169                 <fields>
3170                         <field name="field" reporter:datatype="link"/>
3171                         <field name="id" reporter:datatype="id" />
3172                         <field name="source" reporter:datatype="link"/>
3173                         <field name="value"  reporter:datatype="text"/>
3174                 </fields>
3175                 <links>
3176                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3177                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3178                 </links>
3179         </class>
3180         <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">
3181                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3182                         <field name="field" reporter:datatype="link"/>
3183                         <field name="id" reporter:datatype="id" />
3184                         <field name="source" reporter:datatype="link"/>
3185                         <field name="value"  reporter:datatype="text"/>
3186                 </fields>
3187                 <links>
3188                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3189                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3190                 </links>
3191         </class>
3192         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3193                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3194                         <field name="accepting_usr" reporter:datatype="link"/>
3195                         <field name="amount" reporter:datatype="money" />
3196                         <field name="amount_collected" reporter:datatype="money" />
3197                         <field name="cash_drawer" reporter:datatype="link"/>
3198                         <field name="id" reporter:datatype="id" />
3199                         <field name="note"  reporter:datatype="text"/>
3200                         <field name="payment_ts" reporter:datatype="timestamp"/>
3201                         <field name="xact" reporter:datatype="link"/>
3202                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3203                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3204                 </fields>
3205                 <links>
3206                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3207                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3208                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3209                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3210                 </links>
3211         </class>
3212         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3213                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3214                         <field name="accepting_usr" reporter:datatype="link"/>
3215                         <field name="amount" reporter:datatype="money" />
3216                         <field name="amount_collected" reporter:datatype="money" />
3217                         <field name="id" reporter:datatype="id" />
3218                         <field name="note"  reporter:datatype="text"/>
3219                         <field name="payment_ts" reporter:datatype="timestamp"/>
3220                         <field name="xact" reporter:datatype="link"/>
3221                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3222                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3223                 </fields>
3224                 <links>
3225                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3226                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3227                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3228                 </links>
3229         </class>
3230         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3231                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3232                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3233                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3234                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3235                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3236                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3237                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3238                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3239                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3240                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3241                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3242                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3243                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3244                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3245                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3246                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3247                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3248                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3249                 </fields>
3250                 <links>
3251                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3252                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3253                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3254                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3255                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3256                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3257                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3258                 </links>
3259         </class>
3260
3261         <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">
3262                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3263                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3264                         <field name="name"  reporter:datatype="text"/>
3265                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3266                         <field name="block_list" reporter:datatype="text"/>
3267                         <field name="staff_alert" reporter:datatype="bool"/>
3268                         <field name="org_depth" reporter:datatype="int"/>
3269                 </fields>
3270                 <links/>
3271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3272             <actions>
3273                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3274                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3275                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3276                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3277             </actions>
3278         </permacrud>
3279         </class>
3280         <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">
3281                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3282                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3283                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3284                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3285                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3286                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3287                 </fields>
3288                 <links>
3289                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3290                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3291                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3292         </links>
3293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3294             <actions>
3295                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3296                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3297                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3298                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3299             </actions>
3300         </permacrud>
3301         </class>
3302         <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">
3303                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3304                         <field name="holdable" reporter:datatype="bool"/>
3305                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3306                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3307                         <field name="opac_visible" reporter:datatype="bool"/>
3308             <field name="copy_active" reporter:datatype="bool"/>
3309             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3310                 </fields>
3311                 <links/>
3312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3313             <actions>
3314                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3315                 <retrieve/>
3316                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3317                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3318             </actions>
3319         </permacrud>
3320         </class>
3321         <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">
3322                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3323                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3324                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3325                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3326                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3327                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3328                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3329                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3330                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3331                 </fields>
3332                 <links>
3333                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3334                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3335                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3336                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3337                 </links>
3338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3339                         <actions>
3340                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3341                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3342                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3343                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3344                         </actions>
3345                 </permacrud>
3346         </class>
3347         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3348                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3349                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3350                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3351                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3352                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3353                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3354                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3355                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3356                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3357                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3358                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3359                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3360                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3361                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3362                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3363                 </fields>
3364                 <links>
3365                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3366                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3367                 </links>
3368         </class>
3369         <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">
3370                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3371                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3372                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3373                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3374                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3375                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3376                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3377                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3378                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3379                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3380                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3381                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3382                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3383                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3384                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3385                 </fields>
3386                 <links>
3387                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3388                 </links>
3389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3390                         <actions>
3391                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3392                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3393                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3394                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3395                         </actions>
3396                 </permacrud>
3397         </class>
3398
3399
3400         <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">
3401                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3402                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3403                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3404                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3405                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3406                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3407                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3408                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3409                 </fields>
3410                 <links>
3411                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3412                 </links>
3413         </class>
3414
3415         <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">
3416                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3417                         <field name="call_number" />
3418                         <field name="create_date" reporter:datatype="timestamp"/>
3419                         <field name="creator" reporter:datatype="link"/>
3420                         <field name="id" reporter:datatype="id" />
3421                         <field name="pub" reporter:datatype="bool"/>
3422                         <field name="title"  reporter:datatype="text"/>
3423                         <field name="value"  reporter:datatype="text"/>
3424                 </fields>
3425                 <links>
3426                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3427                 </links>
3428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3429             <actions>
3430                 <create permission="CREATE_VOLUME_NOTE">
3431                     <context link="call_number" field="owning_lib"/>
3432                 </create>
3433                 <retrieve permission="VIEW_VOLUME_NOTES">
3434                     <context link="call_number" field="owning_lib"/>
3435                 </retrieve>
3436                 <update permission="UPDATE_VOLUME_NOTE">
3437                     <context link="call_number" field="owning_lib"/>
3438                 </update>
3439                 <delete permission="DELETE_VOLUME_NOTE">
3440                     <context link="call_number" field="owning_lib"/>
3441                 </delete>
3442             </actions>
3443         </permacrud>
3444         </class>
3445         <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">
3446                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3447                         <field name="create_date" reporter:datatype="timestamp"/>
3448                         <field name="creator" reporter:datatype="link"/>
3449                         <field name="edit_date" reporter:datatype="timestamp"/>
3450                         <field name="editor" reporter:datatype="link"/>
3451                         <field name="id" reporter:datatype="id" />
3452                         <field name="record" reporter:datatype="link"/>
3453                         <field name="value" reporter:datatype="text"/>
3454                 </fields>
3455                 <links>
3456                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3457                 </links>
3458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3459             <actions>
3460                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3461                 <retrieve/>
3462                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3463                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3464             </actions>
3465         </permacrud>
3466         </class>
3467         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3468         <oils_persist:source_definition>
3469 SELECT  usr,
3470         SUM(
3471             CASE
3472                 WHEN (
3473                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3474                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3475                 ) THEN 1
3476                 ELSE 0
3477             END
3478         ) AS out,
3479
3480         SUM(
3481             CASE
3482                 WHEN (
3483                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3484                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3485                 ) THEN 1
3486                 ELSE 0
3487             END
3488         ) AS overdue,
3489
3490         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3491         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3492         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3493   FROM  action.circulation
3494   WHERE checkin_time IS NULL
3495   GROUP BY 1
3496         </oils_persist:source_definition>
3497         <fields oils_persist:primary="usr">
3498             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3499             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3500             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3501             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3502             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3503             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3504         </fields>
3505         <links>
3506             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3507         </links>
3508         </class>
3509         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3510         <oils_persist:source_definition>
3511 SELECT  usr,
3512         ARRAY_TO_STRING(ARRAY_ACCUM(
3513             CASE
3514                 WHEN (
3515                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3516                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3517                 ) THEN id
3518                 ELSE 0
3519             END
3520         ),',') AS out,
3521
3522         ARRAY_TO_STRING(ARRAY_ACCUM(
3523             CASE
3524                 WHEN (
3525                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3526                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3527                 ) THEN id
3528                 ELSE 0
3529             END
3530         ),',') AS overdue,
3531
3532         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3533         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3534         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3535   FROM  action.circulation
3536   WHERE checkin_time IS NULL
3537   GROUP BY 1
3538         </oils_persist:source_definition>
3539         <fields oils_persist:primary="usr">
3540             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3541             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3542             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3543             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3544             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3545             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3546         </fields>
3547         <links>
3548             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3549         </links>
3550         </class>
3551         <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3552                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3553                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3554                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3555                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3556                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3557                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3558                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3559                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3560                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3561                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3562                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3563                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3564                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3565                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3566                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3567                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3568                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3569                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3570                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3571                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3572                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3573                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3574                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3575                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3576                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3577                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3578                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3579                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3580                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3581                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3582                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3583                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3584                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3585                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3586                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3587                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3588                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3589                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3590                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3591                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3592                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3593                 </fields>
3594                 <links>
3595                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3596                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3597                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3598                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3599                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3600                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3601                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3602                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3603                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3604                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3605                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3606                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3607                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3608                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3609                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3610                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3611                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3612                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3613                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3614                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3615                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3616                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3617                 </links>
3618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3619                         <actions>
3620                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3621                         </actions>
3622                 </permacrud>
3623         </class>
3624         <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">
3625                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3626                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3627                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3628                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3629                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3630                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3631                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3632                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3633                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3634                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3635                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3636                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3637                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3638                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3639                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3640                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3641                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3642                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3643                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3644                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3645                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3646                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3647                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3648                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3649                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3650                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3651                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3652                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3653                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3654                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3655                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3656                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3657                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3658                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3659                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3660                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3661                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3662                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3663                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3664                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3665                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3666                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3667                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3668                 </fields>
3669                 <links>
3670                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3671                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3672                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3673                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3674                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3675                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3676                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3677                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3678                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3679                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3680                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3681                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3682                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3683                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3684                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3685                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3686                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3687                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3688                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3689                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3690                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3691                 </links>
3692         </class>
3693         <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">
3694                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3695                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3696                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3697                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3698                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3699                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3700                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3701                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3702                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3703                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3704                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3705                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3706                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3707                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3708                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3709                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3710                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3711                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3712                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3713                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3714                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3715                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3716                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3717                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3718                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3719                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3720                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3721                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3722                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3723                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3724                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3725                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3726                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3727                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3728                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3729                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3730                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3731                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3732                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3733                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3734                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3735                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3736                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3737                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3738                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3739                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3740                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3741                 </fields>
3742                 <links>
3743                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3744                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3745                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3746                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3747                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3748                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3749                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3750                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3751                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3752                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3753                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3754                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3755                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3756                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3757                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3758                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3759                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3760                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3761                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3762                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3763                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3764                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3765                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3766                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3767                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3768                 </links>
3769         </class>
3770
3771         <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">
3772                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3773                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3774                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3775                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3776                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3777                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3778                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3779                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3780                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3781                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3782                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3783                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3784                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3785                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3786                 </fields>
3787                 <links>
3788                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3789                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3790                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3791                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3792                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3793                 </links>
3794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3795                         <actions>
3796                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3797                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3798                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3799                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3800                         </actions>
3801                 </permacrud>
3802         </class>
3803
3804         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3805                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3806                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3807                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3808                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3809                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3810                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3811                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3812                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3813                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3814                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3815                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3816                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3817                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3818                 </fields>
3819                 <links>
3820                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3821                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3822                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3823                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3824                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3825                 </links>
3826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3827                         <actions>
3828                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3829                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3830                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3831                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3832                         </actions>
3833                 </permacrud>
3834         </class>
3835         
3836         <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">
3837                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3838                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3839                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3840                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3841                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3842                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3843                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3844                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3845                 </fields>
3846                 <links>
3847                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3848                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3849                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3850                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3851                 </links>
3852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3853                         <actions>
3854                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3855                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3856                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3857                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3858                         </actions>
3859                 </permacrud>
3860         </class>
3861         
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3864                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3865                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3866                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3867                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3868                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3869                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3870                 </fields>
3871                 <links>
3872                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3873                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3874                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3875                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3876                 </links>
3877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3878                         <actions>
3879                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3880                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3881                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3882                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3883                         </actions>
3884                 </permacrud>
3885         </class>
3886         
3887         <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">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3889                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3890                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3891                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3892                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3893                 </fields>
3894                 <links>
3895                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3896                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3897                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3898                 </links>
3899                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3900                         <actions>
3901                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3902                     <context link="resource" field="owner" />
3903                 </create>
3904                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3905                     <context link="resource" field="owner" />
3906                 </retrieve>
3907                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3908                     <context link="resource" field="owner" />
3909                 </update>
3910                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3911                     <context link="resource" field="owner" />
3912                 </delete>
3913                         </actions>
3914                 </permacrud>
3915         </class>
3916         
3917         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3918                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3919                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3920                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3921                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3922                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3923                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3924                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3925                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3926                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3927                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3928                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3929                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3930                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3931                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3932                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3933                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3934                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3935                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3936                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3937                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3938                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3939                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3940                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3941                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3942                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3943                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3944                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3945                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3946                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3947                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3948                 </fields>
3949                 <links>
3950                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3951                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3952                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3953                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3954                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3955                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3956                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3957                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3958                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3959                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3960                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3961                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3962                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3963                 </links>
3964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3965                         <actions>
3966                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3967                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3968                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3969                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3970                         </actions>
3971                 </permacrud>
3972         </class>
3973         
3974         <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">
3975                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3976                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3977                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3978                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3979                 </fields>
3980                 <links>
3981                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3982                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3983                 </links>
3984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3985                         <actions>
3986                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3987                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3988                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3989                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3990                         </actions>
3991                 </permacrud>
3992         </class>
3993
3994         <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">
3995                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3996                         <field name="bucket" reporter:datatype="link"/>
3997                         <field name="id" reporter:datatype="id" />
3998                         <field name="target_call_number" reporter:datatype="link" />
3999                         <field name="create_time" reporter:datatype="timestamp" />
4000                         <field name="pos" reporter:datatype="int" />
4001                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4002                 </fields>
4003                 <links>
4004                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4005                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4006             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4007                 </links>
4008         </class>
4009         <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">
4010                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4011                         <field name="id" reporter:datatype="id" />
4012                         <field name="item" reporter:datatype="link"/>
4013                         <field name="note" reporter:datatype="text" />
4014                 </fields>
4015                 <links>
4016                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4017                 </links>
4018         </class>
4019         <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">
4020                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4021                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4022                         <field name="btype" reporter:datatype="text"/>
4023                         <field name="id" reporter:datatype="id" />
4024                         <field name="name" reporter:datatype="text"/>
4025                         <field name="description" reporter:datatype="text"/>
4026                         <field name="owner" reporter:datatype="link"/>
4027                         <field name="pub" reporter:datatype="bool"/>
4028                         <field name="create_time" reporter:datatype="timestamp" />
4029                 </fields>
4030                 <links>
4031                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4032                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4033                 </links>
4034         </class>
4035         <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">
4036                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4037                         <field name="id" reporter:datatype="id" />
4038                         <field name="bucket" reporter:datatype="link"/>
4039                         <field name="note" reporter:datatype="text" />
4040                 </fields>
4041                 <links>
4042                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4043                 </links>
4044         </class>
4045         <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">
4046                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4047                         <field name="hold" reporter:datatype="link"/>
4048                         <field name="id" reporter:datatype="id" />
4049                         <field name="target_copy" reporter:datatype="link"/>
4050                 </fields>
4051                 <links>
4052                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4053                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4054                 </links>
4055         </class>
4056         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4057                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4058                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4059                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4060                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4061                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4062                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4063                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4064                 </fields>
4065                 <links>
4066                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4067                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4068                 </links>
4069         </class>
4070         <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">
4071                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4072                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4073                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4074                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4075                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4076                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4077                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4078                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4079                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4080                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4081                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4082                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4083                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4084                 </fields>
4085                 <links>
4086                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4087                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4088                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4089                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4090                 </links>
4091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4092             <actions>
4093                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4094                 <retrieve/>
4095                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4096                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4097             </actions>
4098         </permacrud>
4099         </class>
4100         <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">
4101                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4102                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4103                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4104                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4105                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4106             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4107             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4108             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4109                 </fields>
4110                 <links>
4111                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4112                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4113                 </links>
4114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4115             <actions>
4116                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4117                 <retrieve/>
4118                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4119                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4120             </actions>
4121         </permacrud>
4122         </class>
4123         <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">
4124                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4125                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4126             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4127             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4128                 </fields>
4129                 <links>
4130                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4131                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4132                 </links>
4133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4134             <actions>
4135                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4136                                         <context link="lgroup" field="owner" />
4137                 </create>
4138                 <retrieve/>
4139                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4140                                         <context link="lgroup" field="owner" />
4141                 </update>
4142                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4143                                         <context link="lgroup" field="owner" />
4144                 </delete>
4145             </actions>
4146         </permacrud>
4147         </class>
4148
4149     <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">
4150         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4151             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4152             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4153             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4154             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4155         </fields>
4156         <links>
4157             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4158             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4159         </links>
4160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4161             <actions>
4162                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4163                 <retrieve/>
4164                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4165                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4166             </actions>
4167         </permacrud>
4168     </class>
4169
4170         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4171                 <fields>
4172                         <field name="sre_id" oils_persist:virtual="true" />
4173                         <field name="location" oils_persist:virtual="true" />
4174                         <field name="owning_lib" oils_persist:virtual="true" />
4175                         <field name="basic_holdings" oils_persist:virtual="true" />
4176                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4177                         <field name="supplement_holdings" oils_persist:virtual="true" />
4178                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4179                         <field name="index_holdings" oils_persist:virtual="true" />
4180                         <field name="index_holdings_add" oils_persist:virtual="true" />
4181                         <field name="online" oils_persist:virtual="true" />
4182                         <field name="missing" oils_persist:virtual="true" />
4183                         <field name="incomplete" oils_persist:virtual="true" />
4184                 </fields>
4185         </class>
4186
4187         <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">
4188                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4189                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4190                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4191                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4192                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4193                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4194                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4195                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4196                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4197                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4198                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4199                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4200                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4201                 </fields>
4202                 <links>
4203                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4204                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4205                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4206                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4207                 </links>
4208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4209                         <actions>
4210                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4211                                 <retrieve/>
4212                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4213                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4214                         </actions>
4215                 </permacrud>
4216         </class>
4217
4218         <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">
4219                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4220                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4221                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4222                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4223                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4224                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4225                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4226                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4227                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4228                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4229                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4230                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4231                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4232                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4233                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4234                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4235                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4236                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4237                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4238                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4239                 </fields>
4240                 <links>
4241                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4242                 </links>
4243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244                         <actions>
4245                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4246                                         <context link="subscription" field="owning_lib" />
4247                                 </create>
4248                                 <retrieve />
4249                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4250                                         <context link="subscription" field="owning_lib" />
4251                                 </update>
4252                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4253                                         <context link="subscription" field="owning_lib" />
4254                                 </delete>
4255                         </actions>
4256                 </permacrud>
4257         </class>
4258
4259         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4260                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4261                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4262                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4263                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4264                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4265                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4266                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4267                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4268                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4269                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4270                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4271                 </fields>
4272                 <links>
4273                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4274                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4275                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4276                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4277                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4278                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4279                 </links>
4280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4281                         <actions>
4282                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4283                                 <retrieve />
4284                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4285                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4286                         </actions>
4287                 </permacrud>
4288         </class>
4289
4290         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4291                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4292                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4293                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4294                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4295                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4296                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4297                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4298                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4299                 </fields>
4300                 <links>
4301                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4302                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4303                 </links>
4304         </class>
4305
4306         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4307                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4308                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4309                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4310                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4311                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4312                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4313                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4314                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4315                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4316                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4317                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4318                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4319                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4320                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4321                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4322                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4323                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4324                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4325                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4326                 </fields>
4327                 <links>
4328                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4329                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4330                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4331                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4332                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4333                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4334                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4335                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4336                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4337                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4338                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4339                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4340                 </links>
4341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4342                         <actions>
4343                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4344                                 <retrieve />
4345                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4346                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4347                         </actions>
4348                 </permacrud>
4349         </class>
4350
4351         <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">
4352                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4353                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4354                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4355                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4356                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4357                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4358                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4359                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4360                 </fields>
4361                 <links>
4362                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4363                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4364                 </links>
4365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4366                         <actions>
4367                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4368                                         <context link="distribution" field="holding_lib" />
4369                                 </create>
4370                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4371                                         <context link="distribution" field="holding_lib" />
4372                                 </retrieve>
4373                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4374                                         <context link="distribution" field="holding_lib" />
4375                                 </update>
4376                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4377                                         <context link="distribution" field="holding_lib" />
4378                                 </delete>
4379                         </actions>
4380                 </permacrud>
4381         </class>
4382
4383         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4384                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4385                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4386                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4387                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4388                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4389                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4390                 </fields>
4391                 <links>
4392                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4393                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4394                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4395                 </links>
4396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4397                         <actions>
4398                                 <create permission="ADMIN_SERIAL_STREAM">
4399                                         <context link="distribution" field="holding_lib" />
4400                                 </create>
4401                                 <retrieve />
4402                                 <update permission="ADMIN_SERIAL_STREAM">
4403                                         <context link="distribution" field="holding_lib" />
4404                                 </update>
4405                                 <delete permission="ADMIN_SERIAL_STREAM">
4406                                         <context link="distribution" field="holding_lib" />
4407                                 </delete>
4408                         </actions>
4409                 </permacrud>
4410         </class>
4411
4412         <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">
4413                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4414                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4415                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4416                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4417                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4418                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4419                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4420                 </fields>
4421                 <links>
4422                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4423                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4424                 </links>
4425                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4426                         <actions>
4427                                 <create permission="ADMIN_SERIAL_STREAM">
4428                                         <context link="stream" jump="distribution" field="holding_lib" />
4429                                 </create>
4430                                 <retrieve permission="RECEIVE_SERIAL">
4431                                         <context link="stream" jump="distribution" field="holding_lib" />
4432                                 </retrieve>
4433                                 <update permission="ADMIN_SERIAL_STREAM">
4434                                         <context link="stream" jump="distribution" field="holding_lib" />
4435                                 </update>
4436                                 <delete permission="ADMIN_SERIAL_STREAM">
4437                                         <context link="stream" jump="distribution" field="holding_lib" />
4438                                 </delete>
4439                         </actions>
4440                 </permacrud>
4441         </class>
4442
4443         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4444                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4445                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4446                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4447                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4448                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4449                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4450                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4451                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4452                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4453                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4454                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4455                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4456                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4457                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4458                 </fields>
4459                 <links>
4460                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4461                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4462                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4463                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4464                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4465                 </links>
4466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4467                         <actions>
4468                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4469                                         <context link="subscription" field="owning_lib" />
4470                                 </create>
4471                                 <retrieve/>
4472                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4473                                         <context link="subscription" field="owning_lib" />
4474                                 </update>
4475                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4476                                         <context link="subscription" field="owning_lib" />
4477                                 </delete>
4478                         </actions>
4479                 </permacrud>
4480         </class>
4481
4482         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4483                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4484                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4485                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4486                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4487                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4488                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4489                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4490                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4491                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4492                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4493                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4494                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4495                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4496                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4497                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4498                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4499                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4500                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4501                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4502                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4503                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4504                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4505                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4506                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4507                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4508                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4509                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4510                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4511                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4512                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4513                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4514                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4515                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4516                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4517                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4518                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4519                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4520                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4521                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4522                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4523                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4524                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4525                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4526                 </fields>
4527                 <links>
4528                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4529                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4530                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4531                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4532                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4533                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4534                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4535                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4536                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4537                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4538                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4539                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4540                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4541                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4542                 </links>
4543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4544                         <actions>
4545                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4546                                 <retrieve/>
4547                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4548                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4549                         </actions>
4550                 </permacrud>
4551         </class>
4552
4553         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4554                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4555                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4556                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4557                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4558                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4559                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4560                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4561                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4562                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4563                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4564                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4565                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4566                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4567                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4568                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4569                 </fields>
4570                 <links>
4571                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4572                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4573                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4574                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4575                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4576                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4577                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4578                 </links>
4579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4580                         <actions>
4581                                 <create permission="ADMIN_SERIAL_ITEM">
4582                                         <context link="stream" jump="distribution" field="holding_lib" />
4583                                 </create>
4584                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4585                                         <context link="stream" jump="distribution" field="holding_lib" />
4586                                 </retrieve>
4587                                 <update permission="ADMIN_SERIAL_ITEM">
4588                                         <context link="stream" jump="distribution" field="holding_lib" />
4589                                 </update>
4590                                 <delete permission="ADMIN_SERIAL_ITEM">
4591                                         <context link="stream" jump="distribution" field="holding_lib" />
4592                                 </delete>
4593                         </actions>
4594                 </permacrud>
4595         </class>
4596
4597         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4598                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4599                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4600                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4601                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4602                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4603                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4604                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4605                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4606                 </fields>
4607                 <links>
4608                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4609                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4610                 </links>
4611                 <!-- Not available via PCRUD at this time -->
4612         </class>
4613         <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">
4614                 <fields>
4615                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4616                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4617                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4618                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4619                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4620                 </fields>
4621                 <links>
4622                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4623                 </links>
4624         </class>
4625         <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">
4626                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4627                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4628                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4629                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4630                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4631                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4632                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4633                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4634                 </fields>
4635                 <links>
4636                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4637                 </links>
4638         </class>
4639         <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">
4640                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4641                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4642                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4643                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4644                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4645                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4646                 </fields>
4647                 <links>
4648                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4649                 </links>
4650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4651                         <actions>
4652                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4653                                         <context link="distribution" field="holding_lib" />
4654                                 </create>
4655                                 <retrieve/>
4656                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4657                                         <context link="distribution" field="holding_lib" />
4658                                 </update>
4659                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4660                                         <context link="distribution" field="holding_lib" />
4661                                 </delete>
4662                         </actions>
4663                 </permacrud>
4664         </class>
4665
4666         <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">
4667                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4668                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4669                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4670                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4671                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4672                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4673                 </fields>
4674                 <links>
4675                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4676                 </links>
4677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4678                         <actions>
4679                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4680                                         <context link="distribution" field="holding_lib" />
4681                                 </create>
4682                                 <retrieve/>
4683                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4684                                         <context link="distribution" field="holding_lib" />
4685                                 </update>
4686                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4687                                         <context link="distribution" field="holding_lib" />
4688                                 </delete>
4689                         </actions>
4690                 </permacrud>
4691         </class>
4692
4693         <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">
4694                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4695                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4696                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4697                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4698                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4699                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4700                 </fields>
4701                 <links>
4702                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4703                 </links>
4704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4705                         <actions>
4706                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4707                                         <context link="distribution" field="holding_lib" />
4708                                 </create>
4709                                 <retrieve/>
4710                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4711                                         <context link="distribution" field="holding_lib" />
4712                                 </update>
4713                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4714                                         <context link="distribution" field="holding_lib" />
4715                                 </delete>
4716                         </actions>
4717                 </permacrud>
4718         </class>
4719
4720         <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">
4721                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4722                         <field name="id" reporter:datatype="id" />
4723                         <field name="owning_copy" reporter:datatype="link"/>
4724                         <field name="stat_cat" reporter:datatype="link"/>
4725                         <field name="stat_cat_entry" reporter:datatype="link"/>
4726                 </fields>
4727                 <links>
4728                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4729                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4730                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4731                 </links>
4732         </class>
4733         <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">
4734                 <fields oils_persist:primary="code">
4735                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4736                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4737                 </fields>
4738                 <links/>
4739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4740             <actions>
4741                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4742                 <retrieve/>
4743                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4744                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4745             </actions>
4746         </permacrud>
4747         </class>
4748         <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">
4749                 <fields oils_persist:primary="code">
4750                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4751                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4752                 </fields>
4753                 <links/>
4754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4755             <actions>
4756                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4757                 <retrieve/>
4758                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4759                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4760             </actions>
4761         </permacrud>
4762         </class>
4763         <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">
4764                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4765                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4766                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4767                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4768                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4769                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4770                 </fields>
4771                 <links>
4772             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4773         </links>
4774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4775             <actions>
4776                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4777                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4778                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4779                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4780             </actions>
4781         </permacrud>
4782         </class>
4783         <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">
4784                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4785                         <field name="id" reporter:datatype="id" />
4786                         <field name="name" reporter:datatype="text"/>
4787                 </fields>
4788                 <links/>
4789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4790             <actions>
4791                 <create permission="CREATE_LASSO" global_required="true"/>
4792                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4793                 <update permission="UPDATE_LASSO" global_required="true"/>
4794                 <delete permission="DELETE_LASSO" global_required="true"/>
4795             </actions>
4796         </permacrud>
4797         </class>
4798         <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">
4799                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4800                         <field name="id" reporter:datatype="id" />
4801                         <field name="lasso" reporter:datatype="link"/>
4802                         <field name="org_unit" reporter:datatype="org_unit"/>
4803                 </fields>
4804                 <links>
4805                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4806                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4807                 </links>
4808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4809             <actions>
4810                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4811                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4812                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4813                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4814             </actions>
4815         </permacrud>
4816         </class>
4817         <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">
4818                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4819                         <field name="id" reporter:datatype="id" />
4820                         <field name="from_org" reporter:datatype="org_unit"/>
4821                         <field name="to_org" reporter:datatype="org_unit"/>
4822                         <field name="prox" reporter:datatype="int" />
4823                 </fields>
4824                 <links>
4825                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4826                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4827                 </links>
4828         </class>
4829         <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">
4830                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4831                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4832                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4833                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4834                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4835                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4836                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4837                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4838                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4839                 </fields>
4840                 <links/>
4841         </class>
4842         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4843                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4844                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4845                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4846                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4847                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4848                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4849                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4850                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4851                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4852                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4853                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4854                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4855                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4856                 </fields>
4857                 <links>
4858                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4859                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4860                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4861                 </links>
4862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4863             <actions>
4864                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4865                 <retrieve/>
4866                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4867                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4868             </actions>
4869         </permacrud>
4870         </class>
4871         <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">
4872                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4873                         <field name="address_type"  reporter:datatype="text"/>
4874                         <field name="city"  reporter:datatype="text"/>
4875                         <field name="country"  reporter:datatype="text"/>
4876                         <field name="county"  reporter:datatype="text"/>
4877                         <field name="id" reporter:datatype="id" />
4878                         <field name="org_unit" reporter:datatype="org_unit"/>
4879                         <field name="post_code"  reporter:datatype="text"/>
4880                         <field name="state"  reporter:datatype="text"/>
4881                         <field name="street1"  reporter:datatype="text"/>
4882                         <field name="street2"  reporter:datatype="text"/>
4883                         <field name="valid" reporter:datatype="bool"/>
4884                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4885                 </fields>
4886                 <links>
4887                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4888                 </links>
4889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4890             <actions>
4891                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4892                 <retrieve/>
4893                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4894                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4895             </actions>
4896         </permacrud>
4897         </class>
4898         <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">
4899                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
4900                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4901                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4902                         <field name="query_text" reporter:datatype="text"/>
4903                 </fields>
4904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4905             <actions>
4906                 <retrieve/>
4907             </actions>
4908         </permacrud>
4909         </class>
4910
4911         <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">
4912                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
4913                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4914                         <field name="owner" reporter:datatype="org_unit"/>
4915                         <field name="code" reporter:datatype="text"/>
4916                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4917                         <field name="create_date" reporter:datatype="timestamp"/>
4918                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4919                 </fields>
4920                 <links>
4921                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4922                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
4923                 </links>
4924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4925             <actions>
4926                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4927                 <retrieve/>
4928                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4929                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4930             </actions>
4931         </permacrud>
4932         </class>
4933         <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">
4934                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
4935                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4936                         <field name="grp" reporter:datatype="link"/>
4937                         <field name="pos" reporter:datatype="int"/>
4938                         <field name="query" reporter:datatype="link"/>
4939                 </fields>
4940                 <links>
4941                         <link field="grp" reltype="has_a" key="id" map="" class="asfge"/>
4942                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
4943                 </links>
4944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4945             <actions>
4946                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
4947                     <context link="grp" field="owner"/>
4948                 </create>
4949                 <retrieve/>
4950                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
4951                     <context link="grp" field="owner"/>
4952                 </update>
4953                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
4954                     <context link="grp" field="owner"/>
4955                 </delete>
4956             </actions>
4957         </permacrud>
4958         </class>
4959
4960         <!-- A note: Please update alhr and ahopl when updating ahr -->
4961         <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">
4962                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4963                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4964                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4965                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4966                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4967                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4968                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4969                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4970                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4971                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4972                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4973                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4974                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4975                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4976                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4977                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
4978                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4979                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4980                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4981                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4982                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4983                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4984                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4985                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4986                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4987                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4988                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4989                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4990                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4991                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4992                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4993                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4994                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4995                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4996                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4997                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4998                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4999                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5000                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5001                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5002                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5003                 </fields>
5004                 <links>
5005                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5006                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5007                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5008                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5009                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5010                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5011                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5012                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5013                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5014                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5015                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5016                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5017                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5018                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5019                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5020                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5021                 </links>
5022         </class>
5023         <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
5024                 <oils_persist:source_definition><![CDATA[
5025                 SELECT
5026                         ahr.*,
5027                         COALESCE(acplo.position, 999) AS
5028                                 copy_location_order_position,
5029                         CASE WHEN au.alias IS NOT NULL THEN
5030                                 au.alias
5031                         ELSE
5032                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5033                                         COALESCE(au.family_name, ''),
5034                                         COALESCE(au.suffix, ''),
5035                                         ', ',
5036                                         COALESCE(au.prefix, ''),
5037                                         COALESCE(au.first_given_name, ''),
5038                                         COALESCE(au.second_given_name, '')
5039                                 ], ' '), E'\\s+,', ',')
5040                         END AS usr_display_name,
5041                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5042                                 AS call_number_label,
5043                         siss.label AS issuance_label,
5044                         (ahr.usr <> ahr.requestor) AS is_staff_hold
5045                 FROM action.hold_request ahr
5046                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5047                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5048                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5049                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5050                 JOIN actor.usr au ON (au.id = ahr.usr)
5051                 LEFT JOIN actor.usr_standing_penalty ausp 
5052                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5053                 LEFT JOIN config.standing_penalty csp
5054                         ON (
5055                                 csp.id = ausp.standing_penalty AND 
5056                                 csp.block_list LIKE '%CAPTURE%' AND (
5057                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5058                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5059                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5060                                         )
5061                                 )
5062                         )
5063                 LEFT JOIN serial.issuance siss
5064                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5065                 LEFT JOIN asset.copy_location_order acplo
5066                         ON (acp.location = acplo.location AND
5067                                 acp.circ_lib = acplo.org)
5068                 WHERE
5069                         ahr.capture_time IS NULL AND
5070                         ahr.cancel_time IS NULL AND
5071                         csp.id IS NULL AND
5072                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5073                 ]]></oils_persist:source_definition>
5074                 <fields oils_persist:primary="id">
5075                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5076                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5077                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5078                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5079                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5080                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5081                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5082                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5083                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5084                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5085                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5086                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5087                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5088                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5089                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5090                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5091                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5092                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5093                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5094                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5095                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5096                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5097                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5098                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5099                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5100                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5101                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5102                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5103                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5104                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5105                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5106                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5107                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5108                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5109                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5110                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5111                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5112                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5113                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5114                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5115                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5116                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5117                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5118                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5119                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5120                 </fields>
5121                 <links>
5122                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5123                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5124                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5125                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5126                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5127                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5128                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5129                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5130                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5131                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5132                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5133                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5134                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5135                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5136                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5137                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5138                 </links>
5139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5140                         <actions>
5141                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5142                         </actions>
5143                 </permacrud>
5144         </class>
5145         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5146                 <oils_persist:source_definition>
5147                         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)
5148                 </oils_persist:source_definition>
5149                 <fields oils_persist:primary="id">
5150                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5151                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5152                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5153                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5154                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5155                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5156                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5157                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5158                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5159                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5160                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5161                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5162                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5163                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5164                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5165                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5166                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5168                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5169                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5170                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5171                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5172                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5175                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5176                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5177                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5178                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5179                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5180                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5181                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5182                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5183                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5184                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5185                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5186                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5187                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5188                 </fields>
5189                 <links>
5190                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5191                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5192                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5193                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5194                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5195                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5196                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5197                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5198                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5199                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5200                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5201                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5202                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5203                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5204                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5205                 </links>
5206         </class>
5207
5208         <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">
5209                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5210                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5211                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5212                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5213                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5214                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5215                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5216                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5217                 </fields>
5218                 <links>
5219                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5220                 </links>
5221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5222                         <actions>
5223                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5224                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5225                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5226                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5227                         </actions>
5228                 </permacrud>
5229         </class>
5230         <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">
5231                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5232                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5233                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5234                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5235                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5236                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5237                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5238                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5239                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5240                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5241                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5242                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5243                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5244                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5245                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5246                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5247                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5248                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5249                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5250                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5251                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5252                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5253                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5254                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5255                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5256                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5257                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5258                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5259                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5260                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5261                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5262                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5263                 </fields>
5264                 <links>
5265                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5266                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5267                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5268                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5269                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5270                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5271                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5272                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5273                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5274                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5275                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5276                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5277                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5278                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5279                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5280                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5281                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5282                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5283                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5284                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5285                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5286                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5287                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5288                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5289                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5290                 </links>
5291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5292             <actions>
5293                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5294                 <retrieve />
5295                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5296                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5297             </actions>
5298         </permacrud>
5299         </class>
5300         <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">
5301                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5302                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5303                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5304                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5305                 </fields>
5306                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5307                         <actions>
5308                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5309                                 <retrieve/>
5310                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5311                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5312                         </actions>
5313                 </permacrud>
5314         </class>
5315         <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">
5316                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5317                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5318                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5319                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5320                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5321                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5322                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5323                 </fields>
5324                 <links>
5325                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5327                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5328                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5329                 </links>
5330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5331                         <actions>
5332                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5333                                 <retrieve/>
5334                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5335                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5336                         </actions>
5337                 </permacrud>
5338         </class>
5339         <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">
5340                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5341                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5342                         <field name="btype" reporter:datatype="text"/>
5343                         <field name="id" reporter:datatype="id" />
5344                         <field name="name"  reporter:datatype="text"/>
5345                         <field name="description" reporter:datatype="text"/>
5346                         <field name="owner" reporter:datatype="link"/>
5347                         <field name="pub" reporter:datatype="bool"/>
5348                         <field name="create_time" reporter:datatype="timestamp" />
5349                 </fields>
5350                 <links>
5351                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5352                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5353                 </links>
5354         </class>
5355         <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">
5356                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5357                         <field name="id" reporter:datatype="id" />
5358                         <field name="bucket" reporter:datatype="link"/>
5359                         <field name="note" reporter:datatype="text" />
5360                 </fields>
5361                 <links>
5362                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5363                 </links>
5364         </class>
5365         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5366                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5367                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5368                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5369                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5370                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5371                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5372                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5373                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5374                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5375                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5376                 </fields>
5377                 <links>
5378                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5379                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5380                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5381                 </links>
5382         </class>
5383         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5384                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5385                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5386                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5387                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5388                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5389                 </fields>
5390                 <links>
5391                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5392                 </links>
5393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5394                         <actions>
5395                                 <retrieve permission="VIEW_USER">
5396                                         <context link="usr" field="home_ou" />
5397                                 </retrieve>
5398                         </actions>
5399                 </permacrud>
5400         </class>
5401     <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">
5402         <fields oils_persist:primary="field">
5403             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5404             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5405             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5406         </fields>
5407         <links/>
5408         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5409             <actions>
5410                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5411                 <retrieve />
5412                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5413                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5414             </actions>
5415         </permacrud>
5416     </class>
5417         <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">
5418                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5419                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5420                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5421                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5422                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5423                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5424                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5425                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5426                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5427                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5428                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5429                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5430                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5431                 </fields>
5432                 <links>
5433                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5434                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5435                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5436                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5437                 </links>
5438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5439             <actions>
5440                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5441                 <retrieve />
5442                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5443                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5444             </actions>
5445         </permacrud>
5446         </class>
5447         <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">
5448                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5449                         <field name="field" reporter:datatype="link"/>
5450                         <field name="id" reporter:datatype="id" />
5451                         <field name="source" reporter:datatype="link"/>
5452                         <field name="value"  reporter:datatype="text"/>
5453                 </fields>
5454                 <links>
5455                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5456                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5457                 </links>
5458         </class>
5459         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5460                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5461                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5462                         <field name="btype" reporter:datatype="text"/>
5463                         <field name="id" reporter:datatype="id" />
5464                         <field name="name"  reporter:datatype="text"/>
5465                         <field name="description" reporter:datatype="text"/>
5466                         <field name="owner" reporter:datatype="link"/>
5467                         <field name="pub" reporter:datatype="bool"/>
5468                         <field name="create_time" reporter:datatype="timestamp" />
5469                 </fields>
5470                 <links>
5471                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5472                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5473                 </links>
5474         </class>
5475         <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">
5476                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5477                         <field name="id" reporter:datatype="id" />
5478                         <field name="bucket" reporter:datatype="link"/>
5479                         <field name="note" reporter:datatype="text" />
5480                 </fields>
5481                 <links>
5482                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5483                 </links>
5484         </class>
5485         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5486                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5487                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5488                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5489                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5490                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5491                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5492                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5493                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5494                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5495                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5496                 </fields>
5497                 <links>
5498                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5499                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5500                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5501                 </links>
5502         </class>
5503         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5504                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5505                         <field name="id" reporter:datatype="id" />
5506                         <field name="ind1" />
5507                         <field name="ind2" />
5508                         <field name="record" />
5509                         <field name="subfield" />
5510                         <field name="tag" />
5511                         <field name="value" />
5512                 </fields>
5513                 <links>
5514                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5515                 </links>
5516         </class>
5517         <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">
5518                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5519                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5520                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5521                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5522                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5523                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5524                 </fields>
5525                 <links>
5526                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5527                 </links>
5528         </class>
5529         <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">
5530                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5531                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5532                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5533                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5534                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5535                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5536                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5537                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5538                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5539                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5540                 </fields>
5541                 <links>
5542                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5543                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5544                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5545                 </links>
5546         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5547             <actions>
5548                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5549                 <retrieve/>
5550                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5551                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5552             </actions>
5553         </permacrud>
5554         </class>
5555         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5556                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5557                         <field name="create_date" reporter:datatype="timestamp"/>
5558                         <field name="creator" reporter:datatype="link"/>
5559                         <field name="edit_date" reporter:datatype="timestamp"/>
5560                         <field name="editor" reporter:datatype="link"/>
5561                         <field name="id" reporter:datatype="id" />
5562                         <field name="pub" reporter:datatype="bool"/>
5563                         <field name="record" reporter:datatype="link"/>
5564                         <field name="value"  reporter:datatype="text"/>
5565                 </fields>
5566                 <links>
5567                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5568                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5569                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5570                 </links>
5571         </class>
5572         <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">
5573                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5574                         <field name="balance_owed" reporter:datatype="money" />
5575                         <field name="total_owed" reporter:datatype="money" />
5576                         <field name="total_paid" reporter:datatype="money" />
5577                         <field name="usr" reporter:datatype="link"/>
5578                 </fields>
5579                 <links>
5580                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5581                 </links>
5582         </class>
5583         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5584                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5585                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5586                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5587                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5588                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5589                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5590                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5591                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5592                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5594                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5595                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5596                 </fields>
5597                 <links>
5598                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5599                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5600                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5601                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5602                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5603                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5604                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5605                 </links>
5606         </class>
5607         <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">
5608                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5609                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5610                         <field name="quality" reporter:datatype="int" />
5611                         <field name="source" reporter:datatype="text"/>
5612                         <field name="transcendant" reporter:datatype="bool"/>
5613                         <field name="can_have_copies" reporter:datatype="bool"/>
5614                 </fields>
5615                 <links/>
5616         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5617             <actions>
5618                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5619                 <retrieve/>
5620                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5621                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5622             </actions>
5623         </permacrud>
5624         </class>
5625         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5626                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5627                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5628                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5629                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5630                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5631                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5632                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5633                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5634                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5635                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5636                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5637                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5638                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5639                 </fields>
5640                 <links>
5641                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5642                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5643                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5644                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5645                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5646                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5647                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5648                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5649                 </links>
5650         </class>
5651         <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">
5652                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5653                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5654                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5655                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5656                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5657                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5658                 </fields>
5659                 <links>
5660                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5661                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5662                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5663                 </links>
5664         </class>
5665         <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">
5666                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5667                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5668                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5669                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5670                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5671                 </fields>
5672                 <links>
5673                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5674                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5675                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5676                 </links>
5677         </class>
5678         <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">
5679                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5680                         <field name="bucket" reporter:datatype="link"/>
5681                         <field name="id" reporter:datatype="id" />
5682                         <field name="target_user" reporter:datatype="link"/>
5683                         <field name="create_time" reporter:datatype="timestamp" />
5684                         <field name="pos" reporter:datatype="int" />
5685                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5686                 </fields>
5687                 <links>
5688                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5689                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5690             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5691                 </links>
5692         </class>
5693         <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">
5694                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5695                         <field name="id" reporter:datatype="id" />
5696                         <field name="item" reporter:datatype="link"/>
5697                         <field name="note" reporter:datatype="text" />
5698                 </fields>
5699                 <links>
5700                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5701                 </links>
5702         </class>
5703         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5704                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5705                         <field name="balance_owed" reporter:datatype="money" />
5706                         <field name="total_owed" reporter:datatype="money" />
5707                         <field name="total_paid" reporter:datatype="money" />
5708                         <field name="usr" reporter:datatype="link"/>
5709                 </fields>
5710                 <links>
5711                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5712                 </links>
5713         </class>
5714         <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">
5715                 <fields oils_persist:primary="code" oils_persist:sequence="">
5716                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5717                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5718                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5719                 </fields>
5720                 <links/>
5721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5722             <actions>
5723                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5724                 <retrieve/>
5725                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5726                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5727             </actions>
5728         </permacrud>
5729         </class>
5730         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5731                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5732                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5733                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5734                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5735                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5736                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5737                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5738                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5739                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5740                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5741                 </fields>
5742                 <links>
5743                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5744                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5745                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5746                 </links>
5747         </class>
5748         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5749                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5750                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5751                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5752                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5753                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5754                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5755                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5756                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5757                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5758                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5759                 </fields>
5760                 <links>
5761                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5762                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5763                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5764                 </links>
5765         </class>
5766         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5767                 <fields oils_persist:primary="id" oils_persist:sequence="">
5768                         <field name="checkin_lib" reporter:datatype="link"/>
5769                         <field name="checkin_staff" reporter:datatype="link"/>
5770                         <field name="checkin_time" reporter:datatype="timestamp"/>
5771                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5772                         <field name="circ_staff" reporter:datatype="link"/>
5773                         <field name="desk_renewal" reporter:datatype="bool"/>
5774                         <field name="due_date" reporter:datatype="timestamp"/>
5775                         <field name="duration" reporter:datatype="interval"/>
5776                         <field name="duration_rule" reporter:datatype="link"/>
5777                         <field name="fine_interval" reporter:datatype="interval"/>
5778                         <field name="id" reporter:datatype="id" />
5779                         <field name="max_fine" reporter:datatype="money" />
5780                         <field name="max_fine_rule" reporter:datatype="link"/>
5781                         <field name="opac_renewal" reporter:datatype="bool"/>
5782                         <field name="phone_renewal" reporter:datatype="bool"/>
5783                         <field name="recurring_fine" reporter:datatype="money" />
5784                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5785                         <field name="renewal_remaining" reporter:datatype="int" />
5786             <field name="grace_period" reporter:datatype="interval" />
5787                         <field name="stop_fines" reporter:datatype="text"/>
5788                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5789                         <field name="target_copy" reporter:datatype="link"/>
5790                         <field name="usr" reporter:datatype="link"/>
5791                         <field name="xact_finish" reporter:datatype="timestamp" />
5792                         <field name="xact_start" reporter:datatype="timestamp" />
5793                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5794                 </fields>
5795                 <links>
5796                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5797                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5798                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5799                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5800                 </links>
5801         </class>
5802         <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">
5803                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5804                         <field name="field" reporter:datatype="link"/>
5805                         <field name="id" reporter:datatype="id" />
5806                         <field name="source" reporter:datatype="link"/>
5807                         <field name="value" reporter:datatype="text"/>
5808                 </fields>
5809                 <links>
5810                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5811                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5812                 </links>
5813         </class>
5814         <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">
5815                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5816                         <field name="high" reporter:datatype="money" />
5817                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5818                         <field name="low" reporter:datatype="money" />
5819                         <field name="name" reporter:datatype="text"/>
5820                         <field name="normal" reporter:datatype="money" />
5821                         <field name="recurrence_interval" reporter:datatype="interval"/>
5822             <field name="grace_period" reporter:datatype="interval" />
5823                 </fields>
5824                 <links/>
5825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5826             <actions>
5827                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5828                 <retrieve/>
5829                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5830                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5831             </actions>
5832         </permacrud>
5833         </class>
5834         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5835                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5836                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5837                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5838                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5839                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5840                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5841                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5842                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5843                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5844                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5845                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5846                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5847                 </fields>
5848                 <links>
5849                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5850                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5851                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5852                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5853                 </links>
5854         </class>
5855         <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">
5856                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5857                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5858                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5859                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5860                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5861                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5862                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5863                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5864                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5865                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5866                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5867                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5868                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5869                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5870                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5871                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5872                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5873                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5874                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5875                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5876                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5877                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5878                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5879                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5880                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5881                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5882                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5883                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5884                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5885                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5886                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5887                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5888                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5889                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5890                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5891                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5892                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5893                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5894                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5895                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5896                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5897                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5898                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5899                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5900                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5901                 </fields>
5902                 <links>
5903                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5904                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5905                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5906                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5907                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5908                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5909                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5910                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5911                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5912                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5913                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5914                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5915                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5916                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5917                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5918                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5919                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5920                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5921                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5922                 </links>
5923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5924             <actions>
5925                 <create permission="CREATE_COPY">
5926                     <context link="call_number" field="owning_lib"/>
5927                 </create>
5928                 <retrieve/>
5929                 <update permission="UPDATE_COPY">
5930                     <context link="call_number" field="owning_lib"/>
5931                 </update>
5932                 <delete permission="DELETE_COPY">
5933                     <context link="call_number" field="owning_lib"/>
5934                 </delete>
5935             </actions>
5936         </permacrud>
5937         </class>
5938
5939         <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">
5940                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5941                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5942                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5943                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5944                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5945                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5946                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5947                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5948                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5949                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5950                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5951                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5952                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5953                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5954                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5955                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5956                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5957                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5958                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5959                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5960                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5961                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5962                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5963                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5964                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5965                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5966                 </fields>
5967                 <links>
5968                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5969                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5970                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5971                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5972                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5973                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5974                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5975                 </links>
5976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5977                         <actions>
5978                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5979                                 <retrieve />
5980                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5981                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5982                         </actions>
5983                 </permacrud>
5984         </class>
5985
5986         <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">
5987                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5988                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5989                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5990                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5991                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5992                 </fields>
5993                 <links/>
5994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5995             <actions>
5996                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5997                 <retrieve/>
5998                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5999                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6000             </actions>
6001         </permacrud>
6002         </class>
6003         <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">
6004                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6005                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6006                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6007                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6008                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6009                 </fields>
6010                 <links/>
6011         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6012             <actions>
6013                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6014                 <retrieve/>
6015                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6016                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6017             </actions>
6018         </permacrud>
6019         </class>
6020         <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">
6021                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6022                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6023                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6024                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6025                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6026                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6027                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6028                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6029                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6030                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6031                 </fields>
6032                 <links>
6033                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6034                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6035                 </links>
6036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6037             <actions>
6038                 <create permission="CREATE_PERM" global_required="true"/>
6039                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6040                 <update permission="UPDATE_PERM" global_required="true"/>
6041                 <delete permission="DELETE_PERM" global_required="true"/>
6042             </actions>
6043         </permacrud>
6044         </class>
6045         <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">
6046                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6047                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6048                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6049                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6050                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6051                 </fields>
6052                 <links>
6053                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6054                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6055                 </links>
6056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6057             <actions>
6058                 <create permission="ADMIN_SURVEY">
6059                     <context link="question" jump="survey" field="owner"/>
6060                 </create>
6061                 <retrieve/>
6062                 <update permission="ADMIN_SURVEY">
6063                     <context link="question" jump="survey" field="owner"/>
6064                 </update>
6065                 <delete permission="ADMIN_SURVEY">
6066                     <context link="question" jump="survey" field="owner"/>
6067                 </delete>
6068             </actions>
6069         </permacrud>
6070         </class>
6071         <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">
6072                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6073                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6074                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6075                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6076                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6077                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6078                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6079                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6080                 </fields>
6081                 <links>
6082                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6083                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6084                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6085                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6086                 </links>
6087         </class>
6088         <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">
6089                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6090                         <field name="balance_owed" reporter:datatype="money" />
6091                         <field name="total_owed" reporter:datatype="money" />
6092                         <field name="total_paid" reporter:datatype="money" />
6093                         <field name="usr" reporter:datatype="link"/>
6094                 </fields>
6095                 <links>
6096                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6097                 </links>
6098         </class>
6099         <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">
6100                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6101                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6102                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6103                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6104                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6105                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6106                 </fields>
6107                 <links>
6108                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6109                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6110                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6111                 </links>
6112         </class>
6113         <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">
6114                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6115                         <field name="field" reporter:datatype="link"/>
6116                         <field name="id" reporter:datatype="id" />
6117                         <field name="source" reporter:datatype="link"/>
6118                         <field name="value" reporter:datatype="text"/>
6119                 </fields>
6120                 <links>
6121                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6122                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6123                 </links>
6124         </class>
6125         <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">
6126                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6127                         <field name="field" reporter:datatype="link"/>
6128                         <field name="id" reporter:datatype="id" />
6129                         <field name="source" reporter:datatype="link"/>
6130                         <field name="value" reporter:datatype="text"/>
6131                 </fields>
6132                 <links>
6133                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6134                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6135                 </links>
6136         </class>
6137         <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">
6138                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6139                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6140                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6141                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6142                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6143                 </fields>
6144                 <links>
6145                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6146                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6147                 </links>
6148         </class>
6149         <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">
6150                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6151                         <field name="depth" reporter:datatype="int" />
6152                         <field name="grantable" reporter:datatype="bool"/>
6153                         <field name="grp" reporter:datatype="link"/>
6154                         <field name="id" reporter:datatype="id" />
6155                         <field name="perm" reporter:datatype="link"/>
6156                 </fields>
6157                 <links>
6158                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6159                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6160                 </links>
6161         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6162             <actions>
6163                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6164                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6165                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6166                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6167             </actions>
6168         </permacrud>
6169         </class>
6170         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6171                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6172                         <field name="items" oils_persist:virtual="true" />
6173                         <field name="btype" reporter:datatype="text"/>
6174                         <field name="id" reporter:datatype="id" />
6175                         <field name="name" reporter:datatype="text"/>
6176                         <field name="description" reporter:datatype="text"/>
6177                         <field name="owner" reporter:datatype="link"/>
6178                         <field name="pub" reporter:datatype="bool"/>
6179                         <field name="create_time" reporter:datatype="timestamp" />
6180                 </fields>
6181                 <links>
6182                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6183                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6184                 </links>
6185         </class>
6186         <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">
6187                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6188                         <field name="id" reporter:datatype="id" />
6189                         <field name="bucket" reporter:datatype="link"/>
6190                         <field name="note" reporter:datatype="text" />
6191                 </fields>
6192                 <links>
6193                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6194                 </links>
6195         </class>
6196         <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">
6197                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6198                         <field name="id" reporter:datatype="int" />
6199                         <field name="usr" reporter:datatype="link"/>
6200                         <field name="work_ou" reporter:datatype="link"/>
6201                 </fields>
6202                 <links>
6203                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6204                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6205                 </links>
6206         </class>
6207         <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">
6208                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6209                         <field name="depth" reporter:datatype="int"/>
6210                         <field name="grantable" reporter:datatype="bool"/>
6211                         <field name="id" reporter:datatype="id" />
6212                         <field name="perm" reporter:datatype="link"/>
6213                         <field name="usr" reporter:datatype="link"/>
6214                 </fields>
6215                 <links>
6216                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6217                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6218                 </links>
6219         </class>
6220         <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">
6221                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6222                         <field name="object_id" reporter:datatype="text"/>
6223                         <field name="grantable" reporter:datatype="bool"/>
6224                         <field name="id" reporter:datatype="id" />
6225                         <field name="perm" reporter:datatype="link"/>
6226                         <field name="usr" reporter:datatype="link"/>
6227                         <field name="object_type" reporter:datatype="text"/>
6228                 </fields>
6229                 <links>
6230                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6231                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6232                 </links>
6233         </class>
6234         <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">
6235                 <fields oils_persist:primary="id" oils_persist:sequence="">
6236                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6237                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6238                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6239                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6240                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6241                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6242                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6243                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6244                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6245                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6246                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6247                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6248                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6249                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6250                 </fields>
6251                 <links>
6252                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6253                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6254                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6255                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6256                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6257                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6258                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6259                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6260                 </links>
6261         </class>
6262         <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">
6263                 <fields oils_persist:primary="id" oils_persist:sequence="">
6264                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6265                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6266                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6267                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6268                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6269                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6270                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6271                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6272                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6273                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6274                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6275                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6276                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6277                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6278                 </fields>
6279                 <links>
6280                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6281                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6282                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6283                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6284                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6285                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6286                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6287                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6288                 </links>
6289         </class>
6290         <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">
6291                 <fields oils_persist:primary="id" oils_persist:sequence="">
6292                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6293                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6294                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6295                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6296                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6297                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6298                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6299                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6300                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6301                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6302                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6303                 </fields>
6304                 <links>
6305                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6306                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6307                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6308                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6309                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6310                 </links>
6311         </class>
6312         <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">
6313                 <fields oils_persist:primary="id" oils_persist:sequence="">
6314                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6315                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6316                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6317                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6318                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6319                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6320                         <field reporter:label="Accepting User" name="accepting_usr" />
6321                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6322                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6323                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6324                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6325                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6326                 </fields>
6327                 <links>
6328                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6329                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6330                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6331                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6332                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6333                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6334                 </links>
6335         </class>
6336         <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">
6337                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6338                         <field name="bucket" reporter:datatype="link"/>
6339                         <field name="id" reporter:datatype="id" />
6340                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6341                         <field name="create_time" reporter:datatype="timestamp" />
6342                         <field name="pos" reporter:datatype="int" />
6343                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6344                 </fields>
6345                 <links>
6346                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6347                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6348             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6349                 </links>
6350         </class>
6351         <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">
6352                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6353                         <field name="id" reporter:datatype="id" />
6354                         <field name="item" reporter:datatype="link"/>
6355                         <field name="note" reporter:datatype="text" />
6356                 </fields>
6357                 <links>
6358                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6359                 </links>
6360         </class>
6361         <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">
6362                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6363                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6364                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6365                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6366                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6367                 </fields>
6368                 <links>
6369                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6370                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6371                 </links>
6372         </class>
6373     <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">
6374         <fields oils_persist:primary="field">
6375             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6376             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6377             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6378         </fields>
6379         <links/>
6380         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6381             <actions>
6382                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6383                 <retrieve />
6384                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6385                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6386             </actions>
6387         </permacrud>
6388     </class>
6389         <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">
6390                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6391                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6392                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6393                 </fields>
6394                 <links/>
6395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6396             <actions>
6397                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6398                 <retrieve/>
6399                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6400                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6401             </actions>
6402         </permacrud>
6403         </class>
6404
6405
6406         <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">
6407                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6408                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6409                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6410                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6411                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6412                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6413                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6414                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6415                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6416                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6417                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6418                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6419                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6420                 </fields>
6421                 <links>
6422                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6423                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6424                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6425                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6426                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6427                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6428                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6429                 </links>
6430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6431             <actions>
6432                 <create permission="TRANSIT_COPY">
6433                     <context link="target_copy" field="owner"/>
6434                 </create>
6435                 <retrieve/>
6436                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6437                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6438             </actions>
6439         </permacrud>
6440         </class>
6441         <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">
6442                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6443                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6444                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6445                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6446                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6447                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6448                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6449                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6450                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6451                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6452                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6453                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6454                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6455                 </fields>
6456                 <links>
6457                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6458                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6459                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6460                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6461                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6462                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6463                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6464                 </links>
6465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6466             <actions>
6467                 <create permission="TRANSIT_COPY" context_field="owner">
6468                     <context link="target_copy" field="circ_lib"/>
6469                 </create>
6470                 <retrieve/>
6471                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6472                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6473             </actions>
6474         </permacrud>
6475         </class>
6476         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6477                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6478                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6479                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6480                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6481                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6482                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6483                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6484                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6485                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6486                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6487                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6488                 </fields>
6489                 <links>
6490                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6491                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6492                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6493                 </links>
6494         </class>
6495         <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">
6496                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6497                         <field name="grp" />
6498                         <field name="id" reporter:datatype="id" />
6499                         <field name="usr" />
6500                 </fields>
6501                 <links>
6502                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6503                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6504                 </links>
6505         </class>
6506         <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">
6507                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6508                         <field name="id" reporter:datatype="id" />
6509                         <field name="fq_field" reporter:datatype="text"/>
6510                         <field name="identity_value" reporter:datatype="text"/>
6511                         <field name="translation" reporter:datatype="text"/>
6512                         <field name="string" reporter:datatype="text"/>
6513                 </fields>
6514                 <links>
6515                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6516                 </links>
6517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6518             <actions>
6519                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6520                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6521                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6522                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6523             </actions>
6524         </permacrud>
6525         </class>
6526         <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">
6527                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6528                         <field name="id" reporter:datatype="id" />
6529                         <field name="fm_class" reporter:datatype="text"/>
6530                         <field name="field" reporter:datatype="text"/>
6531                         <field name="owner" reporter:datatype="org_unit"/>
6532                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6533                 </fields>
6534                 <links>
6535                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6536                 </links>
6537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6538             <actions>
6539                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6540                 <retrieve/>
6541                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6542                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6543             </actions>
6544         </permacrud>
6545         </class>
6546         <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">
6547                 <fields oils_persist:primary="code">
6548                         <field name="code" reporter:datatype="id" />
6549                         <field name="marc_code" reporter:datatype="text"/>
6550                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6551                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6552                 </fields>
6553                 <links/>
6554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6555             <actions>
6556                 <create permission="CREATE_LOCALE" global_required="true"/>
6557                 <retrieve/>
6558                 <update permission="UPDATE_LOCALE" global_required="true"/>
6559                 <delete permission="DELETE_LOCALE" global_required="true"/>
6560             </actions>
6561         </permacrud>
6562         </class>
6563         <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">
6564                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6565                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6566                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6567                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6568             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6569                 </fields>
6570                 <links>
6571                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6572                 </links>
6573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6574             <actions>
6575                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6576                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6577                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6578                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6579             </actions>
6580         </permacrud>
6581         </class>
6582
6583         <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">
6584                 <fields oils_persist:primary="id">
6585                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6586                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6587                 </fields>
6588                 <links/>
6589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6590             <actions>
6591                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6592                 <retrieve/>
6593                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6594                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6595             </actions>
6596         </permacrud>
6597         </class>
6598
6599         <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">
6600                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6601                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6602                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6603                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6604                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6605                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6606                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6607                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6608                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6609                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6610                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6611                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6612                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6613                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6614                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6615                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6616                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6617                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6618                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6619                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6620                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6621                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6622                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6623                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6624                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6625                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6626                 </fields>
6627                 <links>
6628                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6629                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6630                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6631                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6632                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6633                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6634                 </links>
6635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6636             <actions>
6637                 <create permission="user_request.create">
6638                     <context link="usr" field="home_ou"/>
6639                                 </create>
6640                 <retrieve permission="user_request.view">
6641                     <context link="usr" field="home_ou"/>
6642                                 </retrieve>
6643                 <update permission="user_request.update">
6644                     <context link="usr" field="home_ou"/>
6645                                 </update>
6646                 <delete permission="user_request.delete">
6647                     <context link="usr" field="home_ou"/>
6648                                 </delete>
6649             </actions>
6650         </permacrud>
6651         </class>
6652
6653         <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">
6654                 <fields oils_persist:primary="code">
6655                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6656                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6657                 </fields>
6658                 <links/>
6659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6660             <actions>
6661                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6662                 <retrieve/>
6663                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6664                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6665             </actions>
6666         </permacrud>
6667         </class>
6668
6669         <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">
6670                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6671                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6672                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6673                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6674                         <field reporter:label="Ratio" name="ratio" />
6675                 </fields>
6676                 <links>
6677                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6678                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6679                 </links>
6680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6681                         <actions>
6682                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6683                                 <retrieve/>
6684                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6685                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6686                         </actions>
6687                 </permacrud>
6688         </class>
6689
6690         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6691                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6692                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6693                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6694                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6695                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6696                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6697                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6698                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6699                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6700                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6701                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6702                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6703                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6704                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6705                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6706                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6707                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6708                 </fields>
6709                 <links>
6710                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6711                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6712             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6713             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6714             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6715                 </links>
6716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6717             <actions>
6718                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6719                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6720                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6721                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6722             </actions>
6723         </permacrud>
6724         </class>
6725
6726         <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">
6727                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6728                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6729                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6730                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6731                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6732                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6733                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6734                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6735                 </fields>
6736                 <links>
6737                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6738                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6739                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6740                 </links>
6741         </class>
6742
6743         <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">
6744                 <fields oils_persist:primary="code">
6745                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6746                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6747                 </fields>
6748                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6749             <actions>
6750                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6751                 <retrieve/>
6752                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6753                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6754             </actions>
6755                 </permacrud>
6756         </class>
6757
6758         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6759                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6760                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6761                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6762                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6763                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6764                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6765                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6766                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6767                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6768                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6769                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6770                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6771                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6772                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6773                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6774                 </fields>
6775                 <links>
6776                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6777                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6778                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6779                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6780                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6781                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6782                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6783                 </links>
6784         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6785             <actions>
6786                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6787                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6788                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6789                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6790             </actions>
6791         </permacrud>
6792         </class>
6793
6794         <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">
6795                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6796                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6797                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6798                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6799                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6800                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6801                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6802                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6803                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6804                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6805                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6806                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6807                 </fields>
6808                 <links>
6809                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6810                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6811                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6812                 </links>
6813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6814             <actions>
6815                 <create   permission="ADMIN_INVOICE">
6816                                         <context link="invoice" field="receiver"/>
6817                                 </create>
6818                 <retrieve permission="ADMIN_INVOICE">
6819                                         <context link="invoice" field="receiver"/>
6820                                 </retrieve>
6821                 <update   permission="ADMIN_INVOICE">
6822                                         <context link="invoice" field="receiver"/>
6823                                 </update>
6824                                 <delete   permission="ADMIN_INVOICE">
6825                                         <context link="invoice" field="receiver"/>
6826                                 </delete>
6827             </actions>
6828         </permacrud>
6829         </class>
6830
6831         <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">
6832                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6833                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6834                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6835                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6836                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6837                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6838                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6839                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6840                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6841                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6842                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6843                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6844                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6845                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6846                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6847                 </fields>
6848                 <links>
6849                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6850                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6851                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6852                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6853                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6854                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6855                 </links>
6856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6857             <actions>
6858                 <create   permission="ADMIN_INVOICE">
6859                                         <context link="invoice" field="receiver"/>
6860                                 </create>
6861                 <retrieve permission="ADMIN_INVOICE">
6862                                         <context link="invoice" field="receiver"/>
6863                                 </retrieve>
6864                 <update   permission="ADMIN_INVOICE">
6865                                         <context link="invoice" field="receiver"/>
6866                                 </update>
6867                                 <delete   permission="ADMIN_INVOICE">
6868                                         <context link="invoice" field="receiver"/>
6869                                 </delete>
6870             </actions>
6871         </permacrud>
6872         </class>
6873
6874         <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">
6875                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6876                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6877                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6878                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6879                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6880                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6881                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6882                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6883                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6884                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6885                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6886                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6887                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6888                 </fields>
6889                 <links>
6890                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6891                 </links>
6892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6893             <actions>
6894                 <create permission="ADMIN_PROVIDER">
6895                     <context link="provider" field="owner"/>
6896                 </create>
6897                 <retrieve permission="ADMIN_PROVIDER">
6898                     <context link="provider" field="owner"/>
6899                 </retrieve>
6900                 <update permission="ADMIN_PROVIDER">
6901                     <context link="provider" field="owner"/>
6902                 </update>
6903                 <delete permission="ADMIN_PROVIDER">
6904                     <context link="provider" field="owner"/>
6905                 </delete>
6906             </actions>
6907         </permacrud>
6908         </class>
6909
6910         <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">
6911                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6912                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6913                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6914                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6915                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6916                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6917                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6918         </fields>
6919                 <links>
6920                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6921                 </links>
6922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6923             <actions>
6924                 <create permission="ADMIN_PROVIDER">
6925                     <context link="provider" field="owner"/>
6926                 </create>
6927                 <retrieve permission="ADMIN_PROVIDER">
6928                     <context link="provider" field="owner"/>
6929                 </retrieve>
6930                 <update permission="ADMIN_PROVIDER">
6931                     <context link="provider" field="owner"/>
6932                 </update>
6933                 <delete permission="ADMIN_PROVIDER">
6934                     <context link="provider" field="owner"/>
6935                 </delete>
6936             </actions>
6937         </permacrud>
6938     </class>
6939         <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">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6941                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6942                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6943                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6944                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6945                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6946                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6947                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6948                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6949                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6950                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6951                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6952                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6953                 </fields>
6954                 <links>
6955                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6956                 </links>
6957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6958             <actions>
6959                 <create permission="ADMIN_PROVIDER">
6960                     <context link="contact" jump='provider' field="owner"/>
6961                 </create>
6962                 <retrieve permission="ADMIN_PROVIDER">
6963                     <context link="contact" jump='provider' field="owner"/>
6964                 </retrieve>
6965                 <update permission="ADMIN_PROVIDER">
6966                     <context link="contact" jump='provider' field="owner"/>
6967                 </update>
6968                 <delete permission="ADMIN_PROVIDER">
6969                     <context link="contact" jump='provider' field="owner"/>
6970                 </delete>
6971             </actions>
6972         </permacrud>
6973         </class>
6974
6975         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6976                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6977                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6978                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6979                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6980                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6981                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6982                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6983                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6984                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6985                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6986                 </fields>
6987                 <links>
6988                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6989                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6990                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6991                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6992                 </links>
6993         </class>
6994
6995         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6996                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6997                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6998                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6999                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7000                 </fields>
7001                 <links>
7002             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7003                 </links>
7004                 <!--
7005                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
7006                         But here's what it should look like if we ever do use pcrud.
7007                 -->
7008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7009                         <actions>
7010                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7011                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7012                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7013                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7014                         </actions>
7015                 </permacrud>
7016         </class>
7017
7018         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
7019                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7020                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7021                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7022                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7023                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7024                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7025                 </fields>
7026                 <links>
7027                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7028                 </links>
7029                 <!--
7030                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
7031                         But here's what it should look like if we ever do use pcrud.
7032                 -->
7033                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7034                         <actions>
7035                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7036                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7037                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7038                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7039                         </actions>
7040                 </permacrud>
7041         </class>
7042
7043         <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">
7044                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7045                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7046                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7047                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7048                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7049                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7050                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7051                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7052                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7053                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7054                 </fields>
7055                 <links>
7056                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7057                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7058             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7059             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7060                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7061                 </links>
7062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7063             <actions>
7064                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7065                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7066                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7067                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7068             </actions>
7069         </permacrud>
7070         </class>
7071
7072         <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">
7073                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7074                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7075                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7076                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7077                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7078                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7079                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7080                 </fields>
7081                 <links>
7082                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7083                 </links>
7084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7085                         <actions>
7086                                 <create permission="ADMIN_FUNDING_SOURCE">
7087                     <context link="funding_source" field="owner"/>
7088                 </create>
7089                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7090                     <context link="funding_source" field="owner"/>
7091                 </retrieve>
7092                                 <update permission="ADMIN_FUNDING_SOURCE">
7093                     <context link="funding_source" field="owner"/>
7094                 </update>
7095                                 <delete permission="ADMIN_FUNDING_SOURCE">
7096                     <context link="funding_source" field="owner"/>
7097                 </delete>
7098                         </actions>
7099                 </permacrud>
7100         </class>
7101
7102         <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">
7103                 <fields oils_persist:primary="id">
7104                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7105                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7106                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7107                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7108                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7109                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7110                 </fields>
7111                 <links>
7112                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7113                 </links>
7114         </class>
7115
7116         <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">
7117                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7118                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7119                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7120                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7121                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7122                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7123                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7124                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7125                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7126                 </fields>
7127                 <links>
7128                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7129                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7130                 </links>
7131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7132                         <actions>
7133                                 <create permission="ADMIN_ACQ_FUND">
7134                     <context link="fund" field="org"/>
7135                 </create>
7136                                 <retrieve permission="ADMIN_ACQ_FUND">
7137                     <context link="fund" field="org"/>
7138                 </retrieve>
7139                                 <update permission="ADMIN_ACQ_FUND">
7140                     <context link="fund" field="org"/>
7141                 </update>
7142                                 <delete permission="ADMIN_ACQ_FUND">
7143                     <context link="fund" field="org"/>
7144                 </delete>
7145                         </actions>
7146                 </permacrud>
7147         </class>
7148
7149         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7150                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7151                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7152                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7153                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7154                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7155                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7156                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7157                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7158                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7159                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7160                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7161                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7162                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7163                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7164                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7165                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7166                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7167                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7168                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7169                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7170                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7171                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7172                 </fields>
7173                 <links>
7174                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7175                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7176             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7177             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7178             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7179             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7180             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7181             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7182             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7183             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7184             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7185                 </links>
7186         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7187             <actions>
7188                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7189                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7190                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7191                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7192             </actions>
7193         </permacrud>
7194         </class>
7195
7196         <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">
7197                 <fields oils_persist:primary="fund">
7198                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7199                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7200                 </fields>
7201                 <links>
7202                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7203                 </links>
7204         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7205             <actions>
7206                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7207                                         <context link="fund" field="org" />
7208                 </retrieve>
7209             </actions>
7210         </permacrud>
7211         </class>
7212
7213         <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">
7214                 <fields oils_persist:primary="fund">
7215                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7216                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7217                 </fields>
7218                 <links>
7219                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7220                 </links>
7221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7222             <actions>
7223                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7224                                         <context link="fund" field="org" />
7225                 </retrieve>
7226             </actions>
7227         </permacrud>
7228         </class>
7229
7230         <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">
7231                 <fields oils_persist:primary="fund">
7232                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7233                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7234                 </fields>
7235                 <links>
7236                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7237                 </links>
7238         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7239             <actions>
7240                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7241                                         <context link="fund" field="org" />
7242                 </retrieve>
7243             </actions>
7244         </permacrud>
7245         </class>
7246
7247         <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">
7248                 <fields oils_persist:primary="fund">
7249                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7250                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7251                 </fields>
7252                 <links>
7253                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7254                 </links>
7255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7256             <actions>
7257                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7258                                         <context link="fund" field="org" />
7259                 </retrieve>
7260             </actions>
7261         </permacrud>
7262         </class>
7263
7264         <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">
7265                 <fields oils_persist:primary="fund">
7266                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7267                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7268                 </fields>
7269                 <links>
7270                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7271                 </links>
7272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7273             <actions>
7274                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7275                                         <context link="fund" field="org" />
7276                 </retrieve>
7277             </actions>
7278         </permacrud>
7279         </class>
7280
7281    <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">
7282         <fields oils_persist:primary="fund">
7283             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7284             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7285         </fields>
7286         <links>
7287             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7288         </links>
7289     </class>
7290
7291    <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">
7292         <fields oils_persist:primary="fund">
7293             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7294             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7295         </fields>
7296         <links>
7297             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7298         </links>
7299     </class>
7300
7301    <class id="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">
7302         <fields oils_persist:primary="fund">
7303             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7304             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7305         </fields>
7306         <links>
7307             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7308         </links>
7309     </class>
7310
7311    <class id="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">
7312         <fields oils_persist:primary="fund">
7313             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7314             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7315         </fields>
7316         <links>
7317             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7318         </links>
7319     </class>
7320
7321    <class id="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">
7322         <fields oils_persist:primary="fund">
7323             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7324             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7325         </fields>
7326         <links>
7327             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7328         </links>
7329     </class>
7330
7331         <class id="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">
7332                 <fields oils_persist:primary="funding_source">
7333                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7334                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7335                 </fields>
7336                 <links>
7337                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7338                 </links>
7339         </class>
7340
7341         <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">
7342                 <fields oils_persist:primary="funding_source">
7343                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7344                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7345                 </fields>
7346                 <links>
7347                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7348                 </links>
7349         </class>
7350
7351         <class id="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">
7352                 <fields oils_persist:primary="funding_source">
7353                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7354                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7355                 </fields>
7356                 <links>
7357                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7358                 </links>
7359         </class>
7360
7361         <class id="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">
7362                 <fields oils_persist:primary="fund">
7363                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7364                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7365                 </fields>
7366                 <links>
7367                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7368                 </links>
7369         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7370             <actions>
7371                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7372                                         <context link="fund" field="org" />
7373                 </retrieve>
7374             </actions>
7375         </permacrud>
7376     </class>
7377     <class id="acqfsum" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_summary" reporter:label="Fund Summary" reporter:core="true" oils_persist:readonly="true">
7378         <oils_persist:source_definition><![CDATA[
7379             SELECT
7380                 acqf.*,
7381                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7382                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7383                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7384                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7385             FROM
7386                 acq.fund acqf
7387                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7388                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7389                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7390                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7391         ]]></oils_persist:source_definition>
7392         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7393             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7394             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7395             <field reporter:label="Name" name="name" reporter:datatype="text" />
7396             <field reporter:label="Year" name="year" reporter:datatype="int" />
7397             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7398             <field reporter:label="Code" name="code" reporter:datatype="text" />
7399             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7400             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7401             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7402             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7403             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7404
7405             <!-- non fund-native fields -->
7406             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7407             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7408             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7409             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7410         </fields>
7411         <links>
7412             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7413             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7414             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7415         </links>
7416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7417             <actions>
7418                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7419             </actions>
7420         </permacrud>
7421         </class>
7422         <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">
7423                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7424                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7425                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7426                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7427                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7428                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7429                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7430                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7431                 </fields>
7432                 <links>
7433                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7434                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7435                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7436                 </links>
7437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7438                         <actions>
7439                                 <create permission="ADMIN_ACQ_FUND">
7440                     <context link="fund" field="org"/>
7441                 </create>
7442                                 <retrieve permission="ADMIN_ACQ_FUND">
7443                     <context link="fund" field="org"/>
7444                 </retrieve>
7445                                 <update permission="ADMIN_ACQ_FUND">
7446                     <context link="fund" field="org"/>
7447                 </update>
7448                                 <delete permission="ADMIN_ACQ_FUND">
7449                     <context link="fund" field="org"/>
7450                 </delete>
7451                         </actions>
7452                 </permacrud>
7453         </class>
7454
7455     <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">
7456         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7457             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7458             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7459             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7460             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7461             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7462             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7463             <field reporter:label="Note" name="note" reporter:datatype="text" />
7464             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7465         </fields>
7466         <links>
7467             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7468             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7469             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7470         </links>
7471                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7472                         <actions>
7473                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7474                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7475                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7476                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7477                         </actions>
7478                 </permacrud>
7479     </class>
7480
7481         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7483                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7484                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7485                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7486                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7487                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7488                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7489                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7490                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7491                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7492                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7493                 </fields>
7494                 <links>
7495                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7496                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7497                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7498                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7499                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7500                 </links>
7501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7502                         <actions>
7503                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7504                         </actions>
7505                 </permacrud>
7506         </class>
7507
7508         <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">
7509                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7510                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7511                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7512                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7513                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7514                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7515                 </fields>
7516                 <links>
7517                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7518                 </links>
7519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7520                         <actions>
7521                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7522                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7523                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7524                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7525                         </actions>
7526                 </permacrud>
7527         </class>
7528
7529         <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">
7530                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7531                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7532                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7533                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7534                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7535                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7536                         <field reporter:label="State" name="state" reporter:datatype="text" />
7537                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7538                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7539                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7540                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7541                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7542                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7543                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7544                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7545                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7546                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7547                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7548                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7549                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7550                 </fields>
7551                 <links>
7552                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7553                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7554                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7555                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7556                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7557                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7558                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7559                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7560                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7561                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7562                 </links>
7563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7564                         <actions>
7565                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7566                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7567                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7568                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7569                         </actions>
7570                 </permacrud>
7571         </class>
7572
7573         <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">
7574                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7575                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7576                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7577                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7578                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7579                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7580                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7581                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7582                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7583                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7584                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7585                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7586                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7587                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7588                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7589                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7590                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7591                 </fields>
7592                 <links>
7593                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7594                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7595                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7596                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7597                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7598                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7599                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7600                 </links>
7601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7602             <actions>
7603                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7604             </actions>
7605                 </permacrud>
7606         </class>
7607
7608         <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">
7609                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7610                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7611                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7612                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7613                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7614                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7615                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7616                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7617                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7618                 </fields>
7619                 <links>
7620                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7621                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7622                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7623                 </links>
7624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7625             <actions>
7626                 <create permission="CREATE_PURCHASE_ORDER">
7627                     <context link="purchase_order" field="ordering_agency"/>
7628                 </create>
7629                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7630                     <context link="purchase_order" field="ordering_agency"/>
7631                 </retrieve>
7632                 <update permission="CREATE_PURCHASE_ORDER">
7633                     <context link="purchase_order" field="ordering_agency"/>
7634                 </update>
7635                 <delete permission="CREATE_PURCHASE_ORDER">
7636                     <context link="purchase_order" field="ordering_agency"/>
7637                 </delete>
7638             </actions>
7639                 </permacrud>
7640         </class>
7641
7642         <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">
7643                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7644                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7645                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7646                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7647                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7648                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7649                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7650                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7651                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7652                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7653                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7654                 </fields>
7655                 <links>
7656                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7657                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7658                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7659                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7660                 </links>
7661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7662             <actions>
7663                 <create permission="CREATE_PURCHASE_ORDER">
7664                     <context link="purchase_order" field="ordering_agency"/>
7665                 </create>
7666                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7667                     <context link="purchase_order" field="ordering_agency"/>
7668                 </retrieve>
7669                 <update permission="CREATE_PURCHASE_ORDER">
7670                     <context link="purchase_order" field="ordering_agency"/>
7671                 </update>
7672                 <delete permission="CREATE_PURCHASE_ORDER">
7673                     <context link="purchase_order" field="ordering_agency"/>
7674                 </delete>
7675             </actions>
7676                 </permacrud>
7677         </class>
7678
7679         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7680                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7681                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7682                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7683                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7684                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7685                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7686                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7687                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7688                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7689                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7690                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7691                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7692                         <field reporter:label="State" name="state" reporter:datatype="text" />
7693                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7694                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7695                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7696                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7697                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7698                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7699                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7700                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7701                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7702                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7703                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7704                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7705                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7706                 </fields>
7707                 <links>
7708                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7709                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7710                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7711                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7712                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7713                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7714                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7715                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7716                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7717                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7718                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7719                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7720                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7721                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7722                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7723                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7724                 </links>
7725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7726                         <actions>
7727                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7728                                         <context link="purchase_order" field="ordering_agency"/>
7729                                         <context link="picklist" field="org_unit"/>
7730                                 </retrieve>
7731                         </actions>
7732                 </permacrud>
7733         </class>
7734
7735         <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">
7736                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7737                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7738                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7739                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7740                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7741                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7742                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7743                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7744                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7745                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7746                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7747                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7748                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7749                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7750                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7751                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7752                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7753                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7754                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7755                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7756                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7757                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7758                 </fields>
7759                 <links>
7760                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7761                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7762                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7763                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7764                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7765                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7766                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7767                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7768                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7769                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7770                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7771                 </links>
7772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7773                         <actions>
7774                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7775                                         <context link="purchase_order" field="ordering_agency"/>
7776                                         <context link="picklist" field="org_unit"/>
7777                                 </retrieve>
7778                         </actions>
7779                 </permacrud>
7780         </class>
7781
7782         <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">
7783                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7784                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7785                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7786                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7787                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7788                 </fields>
7789                 <links>
7790                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7791                 </links>
7792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7793                         <actions>
7794                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7795                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7796                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7797                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7798                         </actions>
7799                 </permacrud>
7800         </class>
7801
7802         <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">
7803                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7804                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7805                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7806                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7807                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7808                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7809                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7810                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7811                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7812                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7813                 </fields>
7814                 <links>
7815                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7816                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7817                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7818                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7819                 </links>
7820         </class>
7821
7822         <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">
7823                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7824                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7825                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7826                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7827                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7828                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7829                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7830                 </fields>
7831                 <links>
7832                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7833                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7834                 </links>
7835         </class>
7836
7837         <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">
7838                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7839                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7840                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7841                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7842                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7843                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7844                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7845                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7846                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7847                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7848                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7849                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7850                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7851                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7852                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7853                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7854                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7855                 </fields>
7856                 <links>
7857                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7858                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7859                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7860                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7861                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7862                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7863                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7864                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7865                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7866                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7867                 </links>
7868         </class>
7869
7870         <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">
7871                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7872                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7873                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7874                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7875                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7876                 </fields>
7877                 <links/>
7878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7879                         <actions>
7880                                 <retrieve />
7881                         </actions>
7882                 </permacrud>
7883         </class>
7884
7885         <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">
7886                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7887                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7888                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7889                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7890                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7891                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7892             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7893                 </fields>
7894                 <links/>
7895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7896             <actions>
7897                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7898                 <retrieve />
7899                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7900                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7901             </actions>
7902         </permacrud>
7903         </class>
7904
7905         <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">
7906                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7907                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7908                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7909                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7910                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7911                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7912                 </fields>
7913                 <links/>
7914         </class>
7915         <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">
7916                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7917                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7918                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7919                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7920                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7921                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7922                 </fields>
7923                 <links>
7924                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7925                 </links>
7926         </class>
7927
7928         <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">
7929             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7930                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7931                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7932                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7933                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7934                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7935                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7936         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7937
7938             </fields>
7939             <links>
7940                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7941             </links>
7942             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7943                 <actions>
7944                     <create permission="ADMIN_PROVIDER">
7945                         <context link="provider" field="owner"/>
7946                     </create>
7947                     <retrieve permission="ADMIN_PROVIDER">
7948                         <context link="provider" field="owner"/>
7949                     </retrieve>
7950                     <update permission="ADMIN_PROVIDER">
7951                         <context link="provider" field="owner"/>
7952                     </update>
7953                     <delete permission="ADMIN_PROVIDER">
7954                         <context link="provider" field="owner"/>
7955                     </delete>
7956                 </actions>
7957             </permacrud>
7958         </class>
7959         
7960         <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">
7961             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7962                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7963                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7964                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7965                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7966             </fields>
7967             <links>
7968                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7969             </links>
7970             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7971                 <actions>
7972                     <create permission="ADMIN_PROVIDER">
7973                         <context link="provider" field="owner"/>
7974                     </create>
7975                     <retrieve permission="ADMIN_PROVIDER">
7976                         <context link="provider" field="owner"/>
7977                     </retrieve>
7978                     <update permission="ADMIN_PROVIDER">
7979                         <context link="provider" field="owner"/>
7980                     </update>
7981                     <delete permission="ADMIN_PROVIDER">
7982                         <context link="provider" field="owner"/>
7983                     </delete>
7984                 </actions>
7985             </permacrud>
7986         </class>
7987         
7988         <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">
7989             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7990                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7991                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7992                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7993                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7994                 </fields>
7995                 <links/>
7996         </class>
7997
7998         <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">
7999                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8000                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8001                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8002                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8003                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8004                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8005                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8006                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8007                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8008                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8009                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8010                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8011                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8012                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8013                 </fields>
8014                 <links>
8015                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8016                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8017                 </links>
8018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8019             <actions>
8020                 <create permission="ADMIN_PROVIDER">
8021                     <context link="provider" field="owner"/>
8022                 </create>
8023                 <retrieve permission="ADMIN_PROVIDER">
8024                     <context link="provider" field="owner"/>
8025                 </retrieve>
8026                 <update permission="ADMIN_PROVIDER">
8027                     <context link="provider" field="owner"/>
8028                 </update>
8029                 <delete permission="ADMIN_PROVIDER">
8030                     <context link="provider" field="owner"/>
8031                 </delete>
8032             </actions>
8033         </permacrud>
8034         </class>
8035
8036         <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">
8037                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8038                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8039                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8040                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8041                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8042                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8043                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8044                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8045                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8046                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8047                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8048                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8049                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8050                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8051                 </fields>
8052                 <links>
8053                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8054                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8055                 </links>
8056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8057             <actions>
8058                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8059                     <context link="account" jump="provider" field="owner"/>
8060                 </retrieve>
8061                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8062                     <context link="account" jump="provider" field="owner"/>
8063                 </update>
8064                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8065                     <context link="account" jump="provider" field="owner"/>
8066                 </delete>
8067             </actions>
8068         </permacrud>
8069         </class>
8070
8071
8072         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8073                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8074                         <field name="id" reporter:datatype="id" />
8075                         <field name="parent" reporter:datatype="link"/>
8076                         <field name="owner" reporter:datatype="link"/>
8077                         <field name="create_time" reporter:datatype="timestamp"/>
8078                         <field name="name" reporter:datatype="text"/>
8079                         <field name="shared" reporter:datatype="bool"/>
8080                         <field name="share_with" reporter:datatype="link"/>
8081                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8082                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8083                 </fields>
8084                 <links>
8085                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8086                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8087                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8088                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8089                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8090                 </links>
8091         </class>
8092         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8093                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8094                         <field name="id" reporter:datatype="id" />
8095                         <field name="parent" reporter:datatype="link"/>
8096                         <field name="owner" reporter:datatype="link"/>
8097                         <field name="create_time" reporter:datatype="timestamp"/>
8098                         <field name="name" reporter:datatype="text"/>
8099                         <field name="shared" reporter:datatype="bool"/>
8100                         <field name="share_with" reporter:datatype="link"/>
8101                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8102                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8103                 </fields>
8104                 <links>
8105                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8106                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8107                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8108                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8109                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8110                 </links>
8111         </class>
8112         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8113                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8114                         <field name="id" reporter:datatype="id" />
8115                         <field name="parent" reporter:datatype="link"/>
8116                         <field name="owner" reporter:datatype="link"/>
8117                         <field name="create_time" reporter:datatype="timestamp"/>
8118                         <field name="name" reporter:datatype="text"/>
8119                         <field name="shared" reporter:datatype="bool"/>
8120                         <field name="share_with" reporter:datatype="link"/>
8121                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8122                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8123                 </fields>
8124                 <links>
8125                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8126                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8127                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8128                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8129                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8130                 </links>
8131         </class>
8132         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8133                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8134                         <field name="id" reporter:datatype="id" />
8135                         <field name="owner" reporter:datatype="link"/>
8136                         <field name="create_time" reporter:datatype="timestamp"/>
8137                         <field name="name" reporter:datatype="text"/>
8138                         <field name="data" reporter:datatype="text"/>
8139                         <field name="folder" reporter:datatype="link"/>
8140                         <field name="description" reporter:datatype="text"/>
8141                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8142                 </fields>
8143                 <links>
8144                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8145                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8146                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8147                 </links>
8148         </class>
8149         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8150                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8151                         <field name="id" reporter:datatype="id" />
8152                         <field name="owner" reporter:datatype="link"/>
8153                         <field name="create_time" reporter:datatype="timestamp"/>
8154                         <field name="template" reporter:datatype="link"/>
8155                         <field name="data" reporter:datatype="text"/>
8156                         <field name="folder" reporter:datatype="link"/>
8157                         <field name="recur" reporter:datatype="bool"/>
8158                         <field name="recurrence" reporter:datatype="interval"/>
8159                         <field name="name" reporter:datatype="text"/>
8160                         <field name="description" reporter:datatype="text"/>
8161                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8162                 </fields>
8163                 <links>
8164                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8165                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8166                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8167                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8168                 </links>
8169         </class>
8170         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8171                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8172                         <field name="id" reporter:datatype="id" />
8173                         <field name="runner" reporter:datatype="link"/>
8174                         <field name="start_time" reporter:datatype="timestamp"/>
8175                         <field name="complete_time" reporter:datatype="timestamp"/>
8176                         <field name="run_time" reporter:datatype="timestamp"/>
8177                         <field name="email" reporter:datatype="text"/>
8178                         <field name="excel_format" reporter:datatype="bool"/>
8179                         <field name="csv_format" reporter:datatype="bool"/>
8180                         <field name="html_format" reporter:datatype="bool"/>
8181                         <field name="error_code" reporter:datatype="int"/>
8182                         <field name="error_text" reporter:datatype="text"/>
8183                         <field name="report" reporter:datatype="link"/>
8184                         <field name="folder" reporter:datatype="link"/>
8185                         <field name="chart_pie" reporter:datatype="bool"/>
8186                         <field name="chart_bar" reporter:datatype="bool"/>
8187                         <field name="chart_line" reporter:datatype="bool"/>
8188                 </fields>
8189                 <links>
8190                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8191                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8192                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8193                 </links>
8194         </class>
8195         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
8196                 <fields oils_persist:primary="id">
8197                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8198                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8199                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8200                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8201                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8202                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8203                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8204                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8205                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8206                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8207                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8208                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8209                 </fields>
8210                 <links>
8211                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8212                 </links>
8213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8214                         <actions>
8215                                 <retrieve />
8216                         </actions>
8217                 </permacrud>
8218         </class>
8219         <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">
8220                 <fields oils_persist:primary="id">
8221                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8222                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8223                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8224                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8225                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8226                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8227                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8228                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8229                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8230                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8231                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8232                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8233                 </fields>
8234                 <links>
8235                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8236                 </links>
8237         </class>
8238         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8239                 <fields oils_persist:primary="id">
8240                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8241                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8242                         <field reporter:label="Fingerprint" name="fingerprint" />
8243                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8244                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8245                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8246                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8247                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8248                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8249                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8250                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8251                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8252                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8253                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8254                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8255                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8256                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8257                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8258                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8259                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8260                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8261                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8262                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8263                 </fields>
8264                 <links>
8265                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8266                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8267                 </links>
8268         </class>
8269         <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">
8270                 <fields oils_persist:primary="id">
8271                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8272                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8273                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8274                 </fields>
8275                 <links>
8276                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8277                 </links>
8278         </class>
8279         <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">
8280                 <fields oils_persist:primary="id">
8281                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8282                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8283                 </fields>
8284                 <links>
8285                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8286                 </links>
8287         </class>
8288         <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">
8289                 <fields oils_persist:primary="id">
8290                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8291                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8292                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8293                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8294                 </fields>
8295                 <links>
8296                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8297                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8298                 </links>
8299         </class>
8300         <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">
8301                 <fields oils_persist:primary="xact">
8302                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8303                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8304                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8305                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8306                 </fields>
8307                 <links>
8308                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8309                 </links>
8310         </class>
8311         <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">
8312                 <fields oils_persist:primary="xact">
8313                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8314                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8315                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8316                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8317                 </fields>
8318                 <links>
8319                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8320                 </links>
8321         </class>
8322         <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)">
8323                 <fields oils_persist:primary="id">
8324                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8325                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8326                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8327                 </fields>
8328                 <links>
8329                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8330                 </links>
8331         </class>
8332         <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">
8333                 <fields oils_persist:primary="id">
8334                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8335                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8336                 </fields>
8337                 <links>
8338                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8339                 </links>
8340         </class>
8341         <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">
8342                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8343                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
8344                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8345                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8346                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8347                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8348                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8349                 </fields>
8350                 <links>
8351                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8352                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8353                 </links>
8354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8355                         <actions>
8356                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8357                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8358                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8359                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8360                         </actions>
8361                 </permacrud>
8362         </class>
8363         <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">
8364                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8365                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8366                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8367                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8368                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8369                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8370                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8371                 </fields>
8372                 <links>
8373                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8374                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8375                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8376                 </links>
8377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8378                         <actions>
8379                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8380                                         <context link="formula" field="owner"/>
8381                                 </create>
8382                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8383                                         <context link="formula" field="owner"/>
8384                                 </retrieve>
8385                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8386                                         <context link="formula" field="owner"/>
8387                                 </update>
8388                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8389                                         <context link="formula" field="owner"/>
8390                                 </delete>
8391                         </actions>
8392                 </permacrud>
8393         </class>
8394
8395         <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">
8396                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8397                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8398                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8399                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8400                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8401                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8402                 </fields>
8403                 <links>
8404                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8405                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8406                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8407                 </links>
8408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8409                         <actions>
8410                                 <create permission="CREATE_PURCHASE_ORDER">
8411                                         <context link="formula" field="owner"/>
8412                 </create>
8413                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8414                                         <context link="formula" field="owner"/>
8415                 </retrieve>
8416                                 <update permission="CREATE_PURCHASE_ORDER">
8417                                         <context link="formula" field="owner"/>
8418                 </update>
8419                                 <delete permission="CREATE_PURCHASE_ORDER">
8420                                         <context link="formula" field="owner"/>
8421                 </delete>
8422                         </actions>
8423                 </permacrud>
8424         </class>
8425
8426         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8427                 <fields oils_persist:primary="id">
8428                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8429                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8430                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8431                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8432                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8433                 </fields>
8434                 <links>
8435                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8436                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8437                 </links>
8438         </class>
8439
8440         <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">
8441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8442                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8443                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8444                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8445                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8446                 </fields>
8447                 <links>
8448                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8449                 </links>
8450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8451                         <actions>
8452                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8453                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8454                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8455                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8456                         </actions>
8457                 </permacrud>
8458         </class>
8459
8460         <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">
8461                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8462                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8463                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8464                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8465                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8466                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8467                 </fields>
8468                 <links>
8469                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8470                 </links>
8471                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8472                         <actions>
8473                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8474                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8475                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8476                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8477                         </actions>
8478                 </permacrud>
8479         </class>
8480
8481         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8483                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8484                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8485                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8486                 </fields>
8487                 <links>
8488                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8489                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8490                 </links>
8491         </class>
8492
8493         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8495                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8496                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8497                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8498                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8499                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8500                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8501                 </fields>
8502                 <links>
8503                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8504                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8505                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8506                 </links>
8507         </class>
8508
8509         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8510                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8511                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8512                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8513                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8514                 </fields>
8515                 <links>
8516                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8517                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8518                 </links>
8519         </class>
8520
8521         <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">
8522                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8523                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8524                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8525                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8526                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8527                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8528                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8529                 </fields>
8530                 <links>
8531                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8532                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8533                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8534                 </links>
8535         </class>
8536
8537         <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">
8538                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8539                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8540                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8541                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8542                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8543                 </fields>
8544                 <links>
8545                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8546                 </links>
8547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8548             <actions>
8549                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8550                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8551                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8552                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8553             </actions>
8554                 </permacrud>
8555         </class>
8556
8557         <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">
8558                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8559                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8560                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8561                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8562                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8563                 </fields>
8564                 <links>
8565                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8566                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8567                 </links>
8568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8569                         <actions>
8570                                 <create permission="ADMIN_CLAIM_POLICY">
8571                                         <context link="claim_policy" field="org_unit"/>
8572                 </create>
8573                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8574                                         <context link="claim_policy" field="org_unit"/>
8575                 </retrieve>
8576                                 <update permission="ADMIN_CLAIM_POLICY">
8577                                         <context link="claim_policy" field="org_unit"/>
8578                 </update>
8579                                 <delete permission="ADMIN_CLAIM_POLICY">
8580                                         <context link="claim_policy" field="org_unit"/>
8581                 </delete>
8582                         </actions>
8583                 </permacrud>
8584         </class>
8585
8586     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8587         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8588             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8589             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8590             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8591             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8592             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8593             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8594             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8595             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8596             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8597             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8598             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8599             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8600             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8601             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8602             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8603         </fields>
8604     </class>
8605
8606     <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">
8607         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8608             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8609             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8610             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8611             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8612             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8613         </fields>
8614     </class>
8615
8616     <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">
8617         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8618             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8619             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8620             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8621             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8622             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8623             <field reporter:label="City" name="city" reporter:datatype="text"/>
8624             <field reporter:label="State" name="state" reporter:datatype="text"/>
8625             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8626             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8627             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8628         </fields>
8629     </class>
8630
8631     <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">
8632         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8633             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8634             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8635             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8636             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8637             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8638             <field reporter:label="City" name="city" reporter:datatype="text"/>
8639             <field reporter:label="State" name="state" reporter:datatype="text"/>
8640             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8641             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8642             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8643         </fields>
8644     </class>
8645
8646     <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">
8647         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8648             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8649             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8650             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8651             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8652             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8653             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8654         </fields>
8655     </class>
8656
8657         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8658                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8659                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8660                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8661                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8662                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8663                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8664                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8665                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8666                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8667                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8668                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8669                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8670                 </fields>
8671                 <links>
8672                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8673                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8674                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8675                 </links>
8676         </class>
8677
8678         <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">
8679                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8680                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8681                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8682                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8683                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8684                 </fields>
8685                 <links>
8686                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8687                 </links>
8688         </class>
8689
8690     <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">
8691         <fields>
8692             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8693             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8694             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8695         </fields>
8696                 <links>
8697                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8698                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8699                 </links>
8700     </class>
8701
8702     <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">
8703         <fields>
8704             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8705             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8706         </fields>
8707                 <links>
8708                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8709                 </links>
8710     </class>
8711
8712     <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">
8713         <fields>
8714             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8715             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8716             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8717         </fields>
8718                 <links>
8719                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8720                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8721                 </links>
8722     </class>
8723
8724     <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">
8725         <fields>
8726             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8727             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8728         </fields>
8729                 <links>
8730                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8731                 </links>
8732     </class>
8733
8734     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8735                 <oils_persist:source_definition>
8736
8737             SELECT  DISTINCT l.*
8738               FROM  action.unfulfilled_hold_loops l
8739                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8740               WHERE l.count = m.max
8741
8742                 </oils_persist:source_definition>
8743         <fields>
8744             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8745             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8746             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8747         </fields>
8748                 <links>
8749                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8750                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8751                 </links>
8752     </class>
8753
8754         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8755                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8756                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8757                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8758                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8759                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8760                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8761                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8762                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8763                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8764                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8765                 </fields>
8766                 <links>
8767                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8768                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8769                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8770                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8771                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8772                 </links>
8773         </class>
8774
8775         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8776                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8777                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8778                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8779                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8780                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8781                 </fields>
8782                 <links>
8783                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8784                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8785                 </links>
8786         </class>
8787
8788         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8789                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8790                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8791                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8792                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8793                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8794                 </fields>
8795                 <links>
8796                 </links>
8797         </class>
8798
8799         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8800                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8801                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8802                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8803                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8804                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8805                 </fields>
8806                 <links>
8807                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8808                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8809                 </links>
8810         </class>
8811         
8812         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8813                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8814                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8815                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8816                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8817                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8818                 </fields>
8819                 <links>
8820                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8821                 </links>
8822         </class>
8823         
8824         <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">
8825                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8826                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8827                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8828                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8829                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8830                 </fields>
8831                 <links>
8832                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8833                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8834                 </links>
8835         </class>
8836
8837         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8838                 <fields oils_persist:primary="name">
8839                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8840                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8841                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8842                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8843                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8844                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8845                 </fields>
8846                 <links>
8847                 </links>
8848         </class>
8849
8850         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8851                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8852                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8853                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8854                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8855                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8856                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8857                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8858                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8859                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8860                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8861                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8862                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8863                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8864                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8865                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8866                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8867                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8868                 </fields>
8869                 <links>
8870                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8871                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8872                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8873                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8874                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8875                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8876                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8877                 </links>
8878         </class>
8879
8880         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8881                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8882                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8883                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8884                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8885                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8886                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8887                 </fields>
8888                 <links>
8889                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8890                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8891                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8892                 </links>
8893         </class>
8894
8895         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8896                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8897                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8898                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8899                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8900                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8901                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8902                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8903                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8904                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8905                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8906                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8907                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8908                 </fields>
8909                 <links>
8910                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8911                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8912                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8913                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8914                 </links>
8915         </class>
8916
8917         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8918                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8919                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8920                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8921                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8922                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8923                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8924                 </fields>
8925                 <links>
8926                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8927                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8928                 </links>
8929         </class>
8930
8931         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8932                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8933                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8934                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8935                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8936                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8937                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8938                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8939                 </fields>
8940                 <links>
8941                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8942                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8943                 </links>
8944         </class>
8945
8946         <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">
8947                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8948                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8949                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8950                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8951                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8952                 </fields>
8953                 <links>
8954                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8955                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8956                 </links>
8957         </class>
8958
8959         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8960                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8961                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8962                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8963                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8964                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8965                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8966                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8967                 </fields>
8968                 <links>
8969                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8970                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8971                 </links>
8972         </class>
8973
8974         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8975                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8976                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8977                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8978                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8979                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8980                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8981                 </fields>
8982                 <links>
8983                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8984                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8985                 </links>
8986         </class>
8987
8988         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8989                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8990                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8991                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8992                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8993                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8994                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8995                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8996                 </fields>
8997                 <links>
8998                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8999                 </links>
9000         </class>
9001
9002         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9003                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9004                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9005                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9006                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9007                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9008                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9009                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9010                 </fields>
9011                 <links>
9012                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9013                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9014                 </links>
9015         </class>
9016
9017         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9018                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9019                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9020                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9021                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9022                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9023                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9024                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9025                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9026                 </fields>
9027                 <links>
9028                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9029                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9030                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9031                 </links>
9032         </class>
9033
9034         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9035                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9036                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9037                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9038                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9039                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9040                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9041                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9042                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9043                 </fields>
9044                 <links>
9045                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9046                 </links>
9047         </class>
9048
9049         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9050                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9051                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9052                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9053                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9054                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9055                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9056                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9057                 </fields>
9058                 <links>
9059                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9060                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9061                 </links>
9062         </class>
9063
9064         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9065                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9066                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9067                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9068                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9069                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9070                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9071                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9072                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9073                 </fields>
9074                 <links>
9075                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9076                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9077                 </links>
9078         </class>
9079
9080         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9081                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9082                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9083                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9084                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9085                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9086                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9087                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9088                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9089                 </fields>
9090                 <links>
9091                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9092                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9093                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9094                 </links>
9095         </class>
9096
9097         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9098                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9099                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9100                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9101                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9102                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9103                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9104                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9105                 </fields>
9106                 <links>
9107                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9108                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9109                 </links>
9110         </class>
9111
9112         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9113                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9114                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9115                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9116                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9117                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9118                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9119                 </fields>
9120                 <links>
9121                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9122                 </links>
9123         </class>
9124
9125         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9126                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9127                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9128                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9129                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9130                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9131                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9132                 </fields>
9133                 <links>
9134                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9135                 </links>
9136         </class>
9137
9138         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9139                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9140                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9141                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9142                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9143                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9144                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9145                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9146                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9147                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9148                 </fields>
9149                 <links>
9150                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9151                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9152                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9153                 </links>
9154         </class>
9155
9156         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9157                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9158                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9159                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9160                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9161                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9162                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9163                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9164                 </fields>
9165                 <links>
9166                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9167                 </links>
9168         </class>
9169
9170         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9171                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9172                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9173                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9174                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9175                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9176                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9177                 </fields>
9178                 <links>
9179                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9180                 </links>
9181         </class>
9182
9183         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9184                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9185                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9186                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9187                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9188                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9189                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9190                 </fields>
9191                 <links>
9192                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9193                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9194                 </links>
9195         </class>
9196
9197         <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">
9198                 <fields oils_persist:primary="id">
9199                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9200                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9201                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9202                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9203                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9204                 </fields>
9205                 <links>
9206                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9207                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9208                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9209                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9210                 </links>
9211         </class>
9212
9213         <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">
9214                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9215                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9216                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9217                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9218                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9219                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9220                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9221                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9222                 </fields>
9223                 <links/>
9224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9225                         <actions>
9226                                 <retrieve/>
9227                         </actions>
9228                 </permacrud>
9229         </class>
9230
9231         <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">
9232                 <fields oils_persist:primary="ptype_key">
9233                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9234                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9235                 </fields>
9236                 <links/>
9237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9238                         <actions>
9239                                 <retrieve/>
9240                         </actions>
9241                 </permacrud>
9242         </class>
9243
9244         <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">
9245                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9246                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9247                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9248                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9249                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9250                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9251                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9252                 </fields>
9253                 <links>
9254                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9255                 </links>
9256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9257                         <actions>
9258                                 <retrieve/>
9259                         </actions>
9260                 </permacrud>
9261         </class>
9262
9263         <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">
9264                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9265                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9266                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9267                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9268                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9269                 </fields>
9270                 <links>
9271                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9272                 </links>
9273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9274                         <actions>
9275                                 <retrieve/>
9276                         </actions>
9277                 </permacrud>
9278         </class>
9279
9280         <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">
9281                 <fields oils_persist:primary="code">
9282                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9283                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9284                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9285                 </fields>
9286                 <links/>
9287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9288                         <actions>
9289                                 <retrieve/>
9290                         </actions>
9291                 </permacrud>
9292         </class>
9293
9294         <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">
9295                 <oils_persist:source_definition>
9296
9297             SELECT  b.id,
9298                     MAX(dcp.edit_date) AS last_delete_date
9299              FROM   biblio.record_entry b
9300                     JOIN asset.call_number cn ON (cn.record = b.id)
9301                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9302              WHERE  NOT b.deleted
9303              GROUP BY b.id
9304              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9305
9306                 </oils_persist:source_definition>
9307                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9308                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9309                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9310                 </fields>
9311                 <links>
9312                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9313                 </links>
9314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9315                         <actions>
9316                                 <retrieve/>
9317                         </actions>
9318                 </permacrud>
9319         </class>
9320
9321         <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">
9322                 <oils_persist:source_definition>
9323
9324             -- -- 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.
9325             -- -- 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
9326             -- -- may not.
9327             -- SELECT
9328             --     bre.id AS "bib_id",
9329             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9330             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9331             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9332             -- FROM (
9333                 SELECT
9334                     y.bre AS "id",
9335                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9336                     y.hold_count AS "hold_count",
9337                     (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"
9338                 FROM (
9339                         SELECT
9340                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9341                             COUNT(*) AS "hold_count"
9342                         FROM action.hold_request h
9343                         WHERE
9344                             cancel_time IS NULL
9345                             AND fulfillment_time IS NULL
9346                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9347                         GROUP BY 1
9348                     )y LEFT JOIN (
9349                         SELECT 
9350                             (SELECT id
9351                                 FROM biblio.record_entry 
9352                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9353                             ) AS "bre", 
9354                             COUNT(*) AS "copy_count"
9355                         FROM asset.copy
9356                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9357                         WHERE copy.holdable 
9358                             AND NOT copy.deleted 
9359                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9360                         GROUP BY 1
9361                     )x ON x.bre = y.bre
9362                 -- )z RIGHT JOIN (
9363                 --     SELECT id
9364                 --     FROM biblio.record_entry
9365                 --     WHERE NOT deleted
9366                 -- )bre ON (z.bib_id = bre.id)
9367                 
9368
9369                 </oils_persist:source_definition>
9370                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9371                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9372                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9373                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9374                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9375                 </fields>
9376                 <links>
9377                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9378                 </links>
9379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9380                         <actions>
9381                                 <retrieve/>
9382                         </actions>
9383                 </permacrud>
9384         </class>
9385
9386         <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">
9387                 <oils_persist:source_definition>
9388             SELECT *,
9389                 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,
9390                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9391             FROM
9392                 (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
9393                     FROM
9394                         action.hold_request ahr
9395                         JOIN reporter.hold_request_record rhrr USING (id)
9396                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9397                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9398                     WHERE
9399                         ahr.cancel_time IS NULL
9400                         AND ahr.fulfillment_time IS NULL
9401                     GROUP BY bib_record, pickup_lib
9402                 )x
9403                 JOIN
9404                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9405                     FROM
9406                         action.hold_request ahr
9407                         JOIN reporter.hold_request_record rhrr USING (id)
9408                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9409                     WHERE
9410                         ahr.cancel_time IS NULL
9411                         AND ahr.fulfillment_time IS NULL
9412                     GROUP BY bib_record
9413                 )y
9414                 USING (id)
9415                 </oils_persist:source_definition>
9416                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9417                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9418                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9419                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9420                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9421                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9422                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9423                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9424                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9425                 </fields>
9426                 <links>
9427                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9428                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9429                 </links>
9430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9431                         <actions>
9432                                 <retrieve/>
9433                         </actions>
9434                 </permacrud>
9435         </class>
9436
9437         <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">
9438                 <oils_persist:source_definition>
9439             SELECT
9440                 ac.id,
9441                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9442                 MAX(actac.xact_start) AS last_circ
9443             FROM asset.copy ac
9444                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9445             GROUP BY ac.id
9446
9447             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9448             --SELECT
9449             --    ac.id,
9450             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9451             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9452             --FROM asset.copy ac
9453             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9454             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9455             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9456                 </oils_persist:source_definition>
9457                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9458                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9459                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9460                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9461                 </fields>
9462                 <links>
9463                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9464                 </links>
9465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9466                         <actions>
9467                                 <retrieve/>
9468                         </actions>
9469                 </permacrud>
9470         </class>
9471
9472         <!-- ********************************************************************************************************************* -->
9473         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9474         <!-- ********************************************************************************************************************* -->
9475         <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">
9476                 <fields oils_persist:primary="id">
9477                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9478                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9479                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9480                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9481                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9482                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9483                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9484                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9485                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9486                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9487                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9488                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9489                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9490                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9491                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9492                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9493                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9494                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9495                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9496                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9497                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9498                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9499                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9500                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9501                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9502                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9503                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9504                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9505                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9506                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9507                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9508                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9509                 </fields>
9510                 <links>
9511                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9512                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9513                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9514                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9515                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9516                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9517                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9518                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9519                 </links>
9520         </class>
9521
9522         <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">
9523                 <fields oils_persist:primary="id">
9524                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9525                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9526                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9527                 </fields>
9528                 <links>
9529                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9530                 </links>
9531         </class>
9532
9533         <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">
9534                 <fields oils_persist:primary="id">
9535                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9536                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9537                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9538                 </fields>
9539                 <links>
9540                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9541                 </links>
9542         </class>
9543
9544         <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">
9545                 <fields oils_persist:primary="id">
9546                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9547
9548                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9549                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9550                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9551
9552                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9553                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9554                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9555
9556                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9557                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9558
9559                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9560                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9561                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9562
9563                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9564                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9565
9566                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9567                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9568                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9569
9570                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9571                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9572                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9573
9574                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9575                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9576                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9577                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9578
9579                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9580                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9581
9582                 </fields>
9583                 <links>
9584                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9585                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9586                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9587                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9588                 </links>
9589         </class>
9590
9591         <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">
9592                 <oils_persist:source_definition>
9593
9594             SELECT
9595                 po.ordering_agency AS ordering_agency,
9596                 po.id AS purchase_order,
9597                 li.id AS lineitem,
9598                 lid.id AS lineitem_detail,
9599                 cpa.id AS claim_policy_action
9600             FROM
9601                 acq.lineitem_detail lid
9602                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9603                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9604                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9605                 JOIN acq.claim_policy_action cpa ON (
9606                     cpa.claim_policy = cp.id
9607
9608                     -- we only care about claim policy actions whose claim
9609                     -- interval we'd reached or exceeded
9610                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9611
9612                     -- filter out all claim policy actions where claim events
9613                     -- have occurred on or after the action's action_interval
9614                     AND NOT EXISTS (
9615                         SELECT 1
9616                         FROM
9617                             acq.claim_event evt
9618                             JOIN acq.claim claim ON (
9619                                 claim.id = evt.claim
9620                                 AND claim.lineitem_detail = lid.id
9621                             )
9622                         WHERE
9623                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9624                     )
9625                 )
9626             WHERE
9627                 lid.cancel_reason IS NULL
9628                 AND li.cancel_reason IS NULL -- belt/suspenders
9629                 AND po.cancel_reason IS NULL -- belt/suspenders
9630                 AND lid.recv_time IS NULL
9631                 AND po.state = 'on-order'
9632             ORDER BY 1, 2, 3, 4, 5
9633
9634                 </oils_persist:source_definition>
9635                 <fields>
9636                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9637                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9638                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9639                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9640                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9641                 </fields>
9642                 <links>
9643                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9644                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9645                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9646                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9647                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9648                 </links>
9649         </class>
9650
9651         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9652                 <oils_persist:source_definition>
9653
9654             SELECT 
9655                 li.id AS lineitem, 
9656                 (
9657                     SELECT COUNT(lid.id) 
9658                     FROM acq.lineitem_detail lid
9659                     WHERE lineitem = li.id
9660                 ) AS item_count,
9661                 (
9662                     SELECT COUNT(lid.id) 
9663                     FROM acq.lineitem_detail lid
9664                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9665                 ) AS recv_count,
9666                 (
9667                     SELECT COUNT(lid.id) 
9668                     FROM acq.lineitem_detail lid
9669                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9670                 ) AS cancel_count,
9671                 (
9672                     SELECT COUNT(lid.id) 
9673                     FROM acq.lineitem_detail lid
9674                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9675                     WHERE NOT debit.encumbrance AND lineitem = li.id
9676                 ) AS invoice_count,
9677                 (
9678                     SELECT COUNT(DISTINCT(lid.id)) 
9679                     FROM acq.lineitem_detail lid
9680                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9681                     WHERE lineitem = li.id
9682                 ) AS claim_count,
9683                 (
9684                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9685                     FROM acq.lineitem_detail lid
9686                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9687                 ) AS estimated_amount,
9688                 (
9689                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9690                     FROM acq.lineitem_detail lid
9691                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9692                     WHERE debit.encumbrance AND lineitem = li.id
9693                 ) AS encumbrance_amount,
9694                 (
9695                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9696                     FROM acq.lineitem_detail lid
9697                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9698                     WHERE NOT debit.encumbrance AND lineitem = li.id
9699                 ) AS paid_amount
9700
9701                 FROM acq.lineitem AS li
9702         </oils_persist:source_definition>
9703                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9704                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9705                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9706                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9707                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9708                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9709                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9710                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9711                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9712                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9713                 </fields>
9714                 <links>
9715                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9716                 </links>
9717     </class>
9718
9719
9720         <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">
9721                 <oils_persist:source_definition>
9722
9723                         SELECT  t.*
9724                           FROM  action.transit_copy t
9725                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9726                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9727                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9728
9729                 </oils_persist:source_definition>
9730                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9731                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9732                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9733                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9734                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9735                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9736                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9737                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9738                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9739                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9740                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9741                 </fields>
9742                 <links>
9743                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9744                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9745                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9746                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9747                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9748                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9749                 </links>
9750         </class>
9751
9752     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9753                 <oils_persist:source_definition>
9754
9755         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9756                 SELECT
9757                         cp.id as copy,
9758                         COUNT(circ.id),
9759                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9760                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9761                 FROM
9762                         asset.copy cp
9763                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9764                 GROUP BY 1, 3, 4
9765                 UNION
9766                 SELECT
9767                         cp.id as copy,
9768                         COUNT(circ.id),
9769                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9770                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9771                 FROM
9772                         asset.copy cp
9773                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9774                 GROUP BY 1, 3, 4
9775                 UNION
9776                 SELECT
9777                         id as copy,
9778                         circ_count,
9779                         -1 AS year,
9780                         false as is_renewal
9781                 FROM
9782                         extend_reporter.legacy_circ_count
9783         )x GROUP BY 1, 3, 4
9784
9785                 </oils_persist:source_definition>
9786         <fields>
9787             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9788             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9789             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9790             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9791         </fields>
9792                 <links>
9793                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9794                 </links>
9795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9796                         <actions>
9797                                 <retrieve/>
9798                         </actions>
9799                 </permacrud>
9800     </class>
9801
9802         <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">
9803                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9804                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9805                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9806                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9807                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9808                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9809                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9810                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9811                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9812                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9813                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9814                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9815                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9816                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9817                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9818                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9819                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9820                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9821                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9822                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9823                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9824                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9825                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9826                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9827                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9828                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9829                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9830                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9831                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9832                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9833                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9834                 </fields>
9835                 <links>
9836                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9837                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9838                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9839                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9840                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9841                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9842                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9843                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9844                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9845                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9846                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9847                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9848                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9849                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9850                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9851                 </links>
9852         </class>
9853
9854     <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">
9855         <fields oils_persist:primary="id">
9856             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9857             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9858             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9859             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9860             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9861             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9862             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9863             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9864             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9865             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9866             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9867             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9868             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9869             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9870             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9871             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9872             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9873             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9874             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9875             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9876             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9877             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9878             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9879             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9880             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9881             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9882             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9883             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9884             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9885             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9886             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9887             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9888             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9889             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9890         </fields>
9891         <links>
9892             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9893             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9894             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9895             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9896             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9897         </links>
9898     </class>
9899
9900     <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">
9901         <fields oils_persist:primary="id">
9902             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9903             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9904             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9905             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9906         </fields>
9907         <links>
9908             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9909             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9910         </links>
9911     </class>
9912
9913     <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">
9914         <fields oils_persist:primary="owning_lib">
9915             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9916             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9917             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9918         </fields>
9919         <links>
9920             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9921         </links>
9922     </class>
9923
9924     <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">
9925         <fields oils_persist:primary="id">
9926             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9927             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9928             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9929             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9930             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9931         </fields>
9932         <links>
9933             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9934             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9935             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9936         </links>
9937     </class>
9938
9939     <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">
9940         <fields oils_persist:primary="circ_lib">
9941             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9942             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9943             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9944             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9945         </fields>
9946         <links>
9947             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9948             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9949         </links>
9950     </class>
9951
9952     <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">
9953         <fields oils_persist:primary="id">
9954             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9955             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9956             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9957             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9958             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9959         </fields>
9960         <links>
9961             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9962             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9963             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9964         </links>
9965     </class>
9966
9967     <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">
9968         <fields oils_persist:primary="home_ou">
9969             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9970             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9971             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9972             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9973         </fields>
9974         <links>
9975             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9976             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9977         </links>
9978     </class>
9979         <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">
9980                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9981                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9982                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9983                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9984                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9985                 </fields>
9986                 <links>
9987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9988                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9989                 </links>
9990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9991                         <actions>
9992                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9993                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9994                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9995                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9996                         </actions>
9997                 </permacrud>
9998         </class>
9999         <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">
10000                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10001                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10002                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10003                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10004                 </fields>
10005                 <links>
10006                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10007                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10008                         </links>
10009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10010                 <actions>
10011                                 <create permission="ADMIN_ACQ_FUND_TAG">
10012                                         <context link="tag" field="owner"/>
10013                                 </create>
10014                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10015                                         <context link="tag" field="owner"/>
10016                                 </retrieve>
10017                                 <update permission="ADMIN_ACQ_FUND_TAG">
10018                                         <context link="tag" field="owner"/>
10019                                 </update>
10020                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10021                                         <context link="tag" field="owner"/>
10022                                 </delete>
10023                         </actions>
10024                 </permacrud>
10025         </class>
10026         <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">
10027                 <oils_persist:source_definition><![CDATA[
10028                 SELECT
10029                         poi.purchase_order AS purchase_order,
10030                         ii.invoice AS invoice,
10031                         NULL AS lineitem,
10032                         poi.id AS po_item,
10033                         NULL AS picklist
10034                 FROM
10035                         acq.po_item poi
10036                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10037                 UNION SELECT
10038                         jub.purchase_order AS purchase_order,
10039                         ie.invoice AS invoice,
10040                         jub.id AS lineitem,
10041                         NULL AS po_item,
10042                         jub.picklist AS picklist
10043                 FROM
10044                         acq.lineitem jub
10045                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10046                 UNION SELECT
10047                         ii.purchase_order AS purchase_order,
10048                         ii.invoice AS invoice,
10049                         NULL AS lineitem,
10050                         NULL AS po_item,
10051                         NULL AS picklist
10052                 FROM
10053                         acq.invoice_item ii
10054                 WHERE ii.po_item IS NULL
10055                 UNION SELECT
10056                         ie.purchase_order AS purchase_order,
10057                         ie.invoice AS invoice,
10058                         NULL AS lineitem,
10059                         NULL AS po_item,
10060                         NULL AS picklist
10061                 FROM
10062                         acq.invoice_entry ie
10063                 WHERE ie.lineitem IS NULL
10064                 UNION SELECT
10065                         NULL AS purchase_order,
10066                         NULL AS invoice,
10067                         jub.id AS lineitem,
10068                         NULL AS po_item,
10069                         jub.picklist AS picklist
10070                 FROM
10071                         acq.lineitem jub
10072                 WHERE jub.purchase_order IS NULL
10073                 ]]></oils_persist:source_definition>
10074                 <fields>
10075                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10076                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10077                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10078                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10079                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10080                 </fields>
10081                 <links>
10082                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10083                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10084                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10085                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10086                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10087                 </links>
10088         </class>
10089         <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">
10090                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10091                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10092                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10093                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10094                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10095                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10096                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10097                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10098                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10099                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10100                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10101                 </fields>
10102                 <links>
10103                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10104                 </links>
10105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10106                         <actions>
10107                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10108                                 <retrieve/>
10109                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10110                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10111                         </actions>
10112                 </permacrud>
10113         </class>
10114
10115         <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">
10116                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10117                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10118                         <field name="date_applied" reporter:datatype="timestamp"/>
10119                         <field name="org" reporter:datatype="org_unit"/>
10120                         <field name="original_value" reporter:datatype="text"/>
10121                         <field name="new_value" reporter:datatype="text"/>
10122                         <field name="field_name" reporter:datatype="link"/>
10123                 </fields>
10124                 <links>
10125                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10126                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10127                 </links>
10128                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10129                         <actions>
10130                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10131                                 <retrieve/>
10132                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10133                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10134                         </actions>
10135                 </permacrud>
10136         </class>
10137         <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">
10138                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10139                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10140                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10141                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10142                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10143                 </fields>
10144                 <links>
10145                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10146                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10147                 </links>
10148         </class>
10149         <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">
10150                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10151                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10152                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10153                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10154                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10155                 </fields>
10156                 <links>
10157                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10158                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10159                 </links>
10160         </class>
10161
10162
10163         <!-- ********************************************************************************************************************* -->
10164
10165 </IDL>
10166
10167 <!--
10168     vim:noet:ts=4:sw=4:
10169 -->