]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
c89fa4656f857d15681dbdb06396619fc4f7fda5
[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" 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     </class>
874
875         <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">
876                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
877                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
878                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
879                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
880                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
881                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
882                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
883                 </fields>
884                 <links>
885             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
886             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
887                 </links>
888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
889                         <actions>
890                                 <retrieve/>
891                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
892                         </actions>
893                 </permacrud>
894         </class>
895
896         <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">
897                 <fields oils_persist:primary="key">
898                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
899                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
900                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
901                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
902                 </fields>
903                 <links/>
904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
905                         <actions>
906                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
907                                 <retrieve/>
908                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
909                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
910                         </actions>
911                 </permacrud>
912         </class>
913
914         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
915                 <fields oils_persist:primary="module">
916                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
917                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
918                 </fields>
919                 <links/>
920         </class>
921
922         <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">
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                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
929                         <actions>
930                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
931                                 <retrieve/>
932                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
933                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
934                         </actions>
935                 </permacrud>
936         </class>
937
938         <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">
939                 <fields oils_persist:primary="module">
940                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
941                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
942                 </fields>
943                 <links/>
944                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
945                         <actions>
946                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
947                                 <retrieve/>
948                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
949                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
950                         </actions>
951                 </permacrud>
952         </class>
953
954         <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">
955                 <fields oils_persist:primary="module">
956                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
957                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
958                 </fields>
959                 <links/>
960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
961                         <actions>
962                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
963                                 <retrieve/>
964                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
965                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
966                         </actions>
967                 </permacrud>
968         </class>
969
970         <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">
971                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
972                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
973                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
974                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
975                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
976                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
977                 </fields>
978                 <links>
979                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
980                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
981                 </links>
982                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
983                         <actions>
984                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
985                     <context link="event_def" field="owner"/>
986                 </create>
987                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
988                     <context link="event_def" field="owner"/>
989                 </retrieve>
990                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
991                     <context link="event_def" field="owner"/>
992                 </update>
993                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
994                     <context link="event_def" field="owner"/>
995                 </delete>
996                         </actions>
997                 </permacrud>
998         </class>
999
1000         <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">
1001                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1002                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1003                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1004                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1005                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1006                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1007                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1008                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1009                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1010                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1011                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1012                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1013                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1014                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1015                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1016                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1017                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1018                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1019                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1020                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1021                 </fields>
1022                 <links>
1023                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1024                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1025                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1026                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1027                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1028                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1029                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1030                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1031                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1032                 </links>
1033                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034                         <actions>
1035                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1036                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1037                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1038                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1039                         </actions>
1040                 </permacrud>
1041         </class>
1042
1043         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1044                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1045                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1046                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1047                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1048                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1049                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1050                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1051                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1052                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1053                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1054                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1055                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1056                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1057                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1058                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1059                 </fields>
1060                 <links>
1061                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1062                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1063                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1064                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1065                 </links>
1066         </class>
1067
1068         <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">
1069                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1070                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1071                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1072                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1073                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1074                 </fields>
1075                 <links>
1076                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1077                 </links>
1078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1079                         <actions>
1080                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1081                     <context link="event_def" field="owner"/>
1082                 </create>
1083                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1084                     <context link="event_def" field="owner"/>
1085                 </retrieve>
1086                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1087                     <context link="event_def" field="owner"/>
1088                 </update>
1089                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1090                     <context link="event_def" field="owner"/>
1091                 </delete>
1092                         </actions>
1093                 </permacrud>
1094         </class>
1095
1096         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1097                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1098                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1099                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1100                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1101                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1102                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1103                 </fields>
1104                 <links>
1105                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1106                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1107                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1108                 </links>
1109         </class>
1110
1111         <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">
1112                 <fields oils_persist:primary="code">
1113                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1114                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1115                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1116                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1117                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1118                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1119                 </fields>
1120                 <links/>
1121         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1122             <actions>
1123                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1124                 <retrieve/>
1125                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1126                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1127             </actions>
1128         </permacrud>
1129         </class>
1130
1131         <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">
1132                 <fields oils_persist:primary="code">
1133                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1134                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1136                 </fields>
1137                 <links/>
1138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1139             <actions>
1140                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1141                 <retrieve/>
1142                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1143                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1144             </actions>
1145         </permacrud>
1146         </class>
1147
1148         <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">
1149                 <fields oils_persist:primary="code">
1150                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1151                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1152                 </fields>
1153                 <links/>
1154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1155             <actions>
1156                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1157                 <retrieve/>
1158                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1159                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1160             </actions>
1161         </permacrud>
1162         </class>
1163
1164         <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">
1165                 <fields oils_persist:primary="code">
1166                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1167                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1168                 </fields>
1169                 <links/>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1173                 <retrieve/>
1174                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1175                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180         <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">
1181                 <fields oils_persist:primary="code">
1182                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1183                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184                 </fields>
1185                 <links/>
1186         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1187             <actions>
1188                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1189                 <retrieve/>
1190                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1191                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1192             </actions>
1193         </permacrud>
1194         </class>
1195
1196         <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">
1197                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1198                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1199                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1200                 </fields>
1201                 <links/>
1202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1203             <actions>
1204                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1205                 <retrieve/>
1206                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1207                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1208             </actions>
1209         </permacrud>
1210         </class>
1211
1212         <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">
1213                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1214                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1215                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1216                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1217                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1218                 </fields>
1219         <links>
1220             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1221             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1222             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1223         </links>
1224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1225             <actions>
1226                 <create permission="UPDATE_COPY">
1227                     <context link="target_copy" field="circ_lib"/>
1228                 </create>
1229                 <retrieve/>
1230                 <update permission="UPDATE_COPY">
1231                     <context link="target_copy" field="circ_lib"/>
1232                 </update>
1233                 <delete permission="UPDATE_COPY">
1234                     <context link="target_copy" field="circ_lib"/>
1235                 </delete>
1236             </actions>
1237         </permacrud>
1238         </class>
1239
1240         <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">
1241                 <fields oils_persist:primary="code">
1242                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1243                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1244                 </fields>
1245                 <links/>
1246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1247             <actions>
1248                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1249                 <retrieve/>
1250                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1251                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1252             </actions>
1253         </permacrud>
1254         </class>
1255
1256         <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">
1257                 <fields oils_persist:primary="code">
1258                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1259                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1260                 </fields>
1261                 <links/>
1262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1263             <actions>
1264                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1265                 <retrieve/>
1266                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1267                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1268             </actions>
1269         </permacrud>
1270         </class>
1271
1272         <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">
1273                 <fields oils_persist:primary="code">
1274                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1275                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1276                 </fields>
1277                 <links/>
1278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1279             <actions>
1280                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1281                 <retrieve/>
1282                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1283                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1284             </actions>
1285         </permacrud>
1286         </class>
1287
1288     <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">
1289         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1290             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1291             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1292             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1293             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1294             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1295             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1296             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1297             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1298             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1299             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1300             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1301             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1302             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1303             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1304             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1305         </fields>
1306         <links/>
1307         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1308             <actions>
1309                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1310                 <retrieve/>
1311                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1312                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1313             </actions>
1314         </permacrud>
1315     </class>
1316
1317     <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">
1318         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1319             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1320             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1321             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1322             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1323             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1324             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1325             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1326             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1327             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1328             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1329             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1330             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1331             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1332             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1333             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1334         </fields>
1335         <links/>
1336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1337             <actions>
1338                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1339                 <retrieve/>
1340                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1341                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1342             </actions>
1343         </permacrud>
1344     </class>
1345
1346     <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">
1347         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1348             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1349             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1350             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1351             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1352             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1353         </fields>
1354         <links>
1355             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1356             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1357             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1358         </links>
1359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1360             <actions>
1361                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1362                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1363                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1364                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1365             </actions>
1366         </permacrud>
1367     </class>
1368
1369         <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">
1370                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1371                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1372                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1373                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1374                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1375                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1376                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1377                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1378                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1379                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1380                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1381                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1382                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1383                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1384                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1385                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1386                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1387             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1388                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1389                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1390                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1391                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1392                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1393                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1394                 </fields>
1395                 <links>
1396                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1397                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1398                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1399                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1400                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1401                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1402                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1403                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1404                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1405                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1406                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1407                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1408                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1409             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1410                 </links>
1411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1412             <actions>
1413                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1414                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1415                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1416                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1417             </actions>
1418         </permacrud>
1419         </class>
1420
1421         <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">
1422                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1423                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1424                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1425                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1426                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1427                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1428                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1429                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1430                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1431                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1432                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1433                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1434                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1435                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1436                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1437             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1438                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1439                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1440             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1441                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1442                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1443                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1444                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1445             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1446             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1447             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1448                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1449                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1450                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1451                 </fields>
1452                 <links>
1453                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1454                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1455                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1456                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1457                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1458                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1459                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1460                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1461                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1462                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1463                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1464                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1465                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1466             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1467                 </links>
1468         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1469             <actions>
1470                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1471                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1472                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1473                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1474             </actions>
1475         </permacrud>
1476         </class>
1477
1478     <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">
1479         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1480             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1481             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1482             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1483         </fields>
1484         <links/>
1485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1486             <actions>
1487                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1488                 <retrieve/>
1489                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1490                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1491             </actions>
1492         </permacrud>
1493     </class>
1494
1495     <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">
1496         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1497             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1498             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1499             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1500             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1501             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1502             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1503             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1504         </fields>
1505         <links>
1506             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1507         </links>
1508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1509             <actions>
1510                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1511                 <retrieve/>
1512                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1513                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1514             </actions>
1515         </permacrud>
1516     </class>
1517
1518     <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">
1519         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1520             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1521             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1522             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1523             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1524             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1525         </fields>
1526         <links>
1527             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1528             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1529         </links>
1530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1531             <actions>
1532                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1533                     <context link="matchpoint" field="org_unit"/>
1534                 </create>
1535                 <retrieve/>
1536                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1537                     <context link="matchpoint" field="org_unit"/>
1538                 </update>
1539                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1540                     <context link="matchpoint" field="org_unit"/>
1541                 </delete>
1542             </actions>
1543         </permacrud>
1544     </class>
1545
1546     <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">
1547         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1548             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1549             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1550             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1551         </fields>
1552         <links>
1553             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1554             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1555         </links>
1556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557             <actions>
1558                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1559                     <context link="limit_set" field="owning_lib"/>
1560                 </create>
1561                 <retrieve/>
1562                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1563                     <context link="limit_set" field="owning_lib"/>
1564                 </update>
1565                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1566                     <context link="limit_set" field="owning_lib"/>
1567                 </delete>
1568             </actions>
1569         </permacrud>
1570     </class>
1571
1572     <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">
1573         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1574             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1575             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1576             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1577             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1578         </fields>
1579         <links>
1580             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1581             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1582         </links>
1583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1584             <actions>
1585                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1586                     <context link="limit_set" field="owning_lib"/>
1587                 </create>
1588                 <retrieve/>
1589                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1590                     <context link="limit_set" field="owning_lib"/>
1591                 </update>
1592                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1593                     <context link="limit_set" field="owning_lib"/>
1594                 </delete>
1595             </actions>
1596         </permacrud>
1597     </class>
1598
1599         <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">
1600                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1601                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1602                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1603                 </fields>
1604                 <links/>
1605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1606             <actions>
1607                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1608                 <retrieve/>
1609                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1610                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1611             </actions>
1612         </permacrud>
1613         </class>
1614
1615         <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">
1616                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1617                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1618                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1619                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1620                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1621                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1622                 </fields>
1623                 <links>
1624                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1625                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1626                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1627                 </links>
1628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1629             <actions>
1630                 <create permission="ADMIN_SURVEY">
1631                     <context link="survey" field="owner"/>
1632                 </create>
1633                 <retrieve/>
1634                 <update permission="ADMIN_SURVEY">
1635                     <context link="survey" field="owner"/>
1636                 </update>
1637                 <delete permission="ADMIN_SURVEY">
1638                     <context link="survey" field="owner"/>
1639                 </delete>
1640             </actions>
1641         </permacrud>
1642         </class>
1643         <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">
1644                 <fields oils_persist:primary="id" oils_persist:sequence="">
1645                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1646                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1647                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1648                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1649                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1650                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1651                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1652                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1653                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1654                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1655                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1656                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1657                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1658                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1659                 </fields>
1660                 <links>
1661                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1662                 </links>
1663         </class>
1664         <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">
1665                 <fields oils_persist:primary="id" oils_persist:sequence="">
1666                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1667                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1668                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1669                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1670                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1671                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1672                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1673                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1674                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1675                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1676                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1677                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1678                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1679                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1680                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1681                 </fields>
1682                 <links>
1683                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1684                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1685                 </links>
1686         </class>
1687         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1688                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1689                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1690                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1691                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1692                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1693                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1694                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1695                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1696                 </fields>
1697                 <links>
1698                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1699                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1700                 </links>
1701         </class>
1702         <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">
1703                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1704                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1705                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1706                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1707                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1708                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1709                 </fields>
1710                 <links>
1711                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1712                 </links>
1713         </class>
1714         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1715                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1716                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1717                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1718                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1719                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1720                 </fields>
1721                 <links>
1722                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1723                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1724                 </links>
1725         </class>
1726         <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">
1727                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1728                         <field name="field" reporter:datatype="link"/>
1729                         <field name="id" reporter:datatype="id" />
1730                         <field name="source" reporter:datatype="link"/>
1731                         <field name="value" reporter:datatype="text"/>
1732                 </fields>
1733                 <links>
1734                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1735                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1736                 </links>
1737         </class>
1738         <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">
1739                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1740                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1741                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1742                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1743                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1744                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1745                 </fields>
1746                 <links>
1747                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1748                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1749                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1750                 </links>
1751         </class>
1752         <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">
1753                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1754                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1755                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1756                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1757                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1758                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1759                 </fields>
1760                 <links>
1761                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1762                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1763                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1764                 </links>
1765         </class>
1766         <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">
1767                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1768                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1769                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1770                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1771                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1772                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1773                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1774                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1775                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1776                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1777                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1778                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1779                 </fields>
1780                 <links>
1781                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1782                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1783                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1784                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1785                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1786                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1787                 </links>
1788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1789             <actions>
1790                 <create permission="TRANSIT_COPY" context_field="owner">
1791                     <context link="target_copy" field="circ_lib"/>
1792                 </create>
1793                 <retrieve/>
1794                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1795                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1796             </actions>
1797         </permacrud>
1798         </class>
1799         <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">
1800                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1801                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1802                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1803                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1804                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1805                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1806                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1807                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1808                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1809                 </fields>
1810                 <links>
1811                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1812                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1813                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1814                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1815                 </links>
1816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1817             <actions>
1818                 <create permission="ADMIN_SURVEY">
1819                     <context link="survey" field="owner"/>
1820                 </create>
1821                 <retrieve/>
1822                 <update permission="ADMIN_SURVEY">
1823                     <context link="survey" field="owner"/>
1824                 </update>
1825                 <delete permission="ADMIN_SURVEY">
1826                     <context link="survey" field="owner"/>
1827                 </delete>
1828             </actions>
1829         </permacrud>
1830         </class>
1831         <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">
1832                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1833                         <field name="bucket" />
1834                         <field name="id" reporter:datatype="id" />
1835                         <field name="target_copy" reporter:datatype="link"/>
1836                         <field name="create_time" reporter:datatype="timestamp" />
1837                         <field name="pos" reporter:datatype="int" />
1838                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1839                 </fields>
1840                 <links>
1841                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1842                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1843             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1844                 </links>
1845         </class>
1846         <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">
1847                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1848                         <field name="id" reporter:datatype="id" />
1849                         <field name="item" reporter:datatype="link"/>
1850                         <field name="note" reporter:datatype="text" />
1851                 </fields>
1852                 <links>
1853                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1854                 </links>
1855         </class>
1856
1857         <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">
1858                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1859                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1860                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1861                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1862                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1863                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1864                 </fields>
1865                 <links>
1866                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1867                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1868                 </links>
1869                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1870                         <actions>
1871                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1872                                 <retrieve/>
1873                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1874                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1875                         </actions>
1876                 </permacrud>
1877         </class>
1878
1879         <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">
1880                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1881                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1882                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1883                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1884                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1885                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1886                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
1887                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1888                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1889                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1890                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1891                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1892                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1893                 </fields>
1894                 <links>
1895                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1896                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1897                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1898                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1899                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1900                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1901                 </links>
1902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1903                         <actions>
1904                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1905                                 <retrieve/>
1906                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1907                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1908                         </actions>
1909                 </permacrud>
1910         </class>
1911
1912         <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">
1913                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1914                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1915                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1916                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1917                 </fields>
1918                 <links>
1919                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1920                 </links>
1921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1922                         <actions>
1923                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1924                                 <retrieve/>
1925                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1926                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1927                         </actions>
1928                 </permacrud>
1929         </class>
1930
1931         <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">
1932                 <fields oils_persist:primary="code">
1933                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1934                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1935                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1936                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1937                 </fields>
1938                 <links>
1939                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1940                 </links>
1941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1942                         <actions>
1943                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1944                                 <retrieve/>
1945                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1946                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1947                         </actions>
1948                 </permacrud>
1949         </class>
1950
1951         <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">
1952                 <fields oils_persist:primary="code">
1953                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1954                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1955                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1956                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1957                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1958                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1959                 </fields>
1960                 <links>
1961                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1962                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1963                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1964                 </links>
1965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1966                         <actions>
1967                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1968                                 <retrieve/>
1969                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1970                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1971                         </actions>
1972                 </permacrud>
1973         </class>
1974
1975     <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">
1976         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1977             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1978             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1979             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1980         </fields>
1981         <links>
1982             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1983             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1984         </links>
1985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1986             <actions>
1987                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1988                 <retrieve/>
1989                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1990                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1991             </actions>
1992         </permacrud>
1993     </class>
1994
1995         <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">
1996                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1997                         <field name="active" reporter:datatype="bool"/>
1998                         <field name="create_date" reporter:datatype="timestamp"/>
1999                         <field name="creator" />
2000                         <field name="deleted" reporter:datatype="bool"/>
2001                         <field name="edit_date" reporter:datatype="timestamp"/>
2002                         <field name="editor" />
2003                         <field name="id" reporter:datatype="id" />
2004                         <field name="last_xact_id" />
2005                         <field name="marc" />
2006                         <field name="source" />
2007                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2008                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2009                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2010                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2011                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2012                 </fields>
2013                 <links>
2014                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2015                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2016                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2017                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2018                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2019                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2020                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2021                 </links>
2022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2023                         <actions>
2024                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2025                                 <retrieve/>
2026                                 <update permission="UPDATE_MARC" global_required="true"/>
2027                                 <delete permission="UPDATE_MARC" global_required="true"/>
2028                         </actions>
2029                 </permacrud>
2030         </class>
2031         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2032                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2033                         <field name="char_encoding" />
2034                         <field name="id" />
2035                         <field name="record" />
2036                         <field name="record_status" />
2037                         <field name="thesaurus" />
2038                 </fields>
2039                 <links>
2040                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2041                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2042                 </links>
2043         </class>
2044         <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">
2045                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2046                         <field name="id" reporter:datatype="id" />
2047                         <field name="bib" reporter:datatype="link" />
2048                         <field name="authority" reporter:datatype="link" />
2049                 </fields>
2050                 <links>
2051                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2052                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2053                 </links>
2054         </class>
2055         <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">
2056                 <fields oils_persist:primary="code" oils_persist:sequence="">
2057                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2058                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2059                 </fields>
2060                 <links/>
2061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2062             <actions>
2063                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2064                 <retrieve/>
2065                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2066                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2067             </actions>
2068         </permacrud>
2069         </class>
2070         <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">
2071                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2072                         <field name="accepting_usr" />
2073                         <field name="amount" reporter:datatype="money" />
2074                         <field name="amount_collected" reporter:datatype="money" />
2075                         <field name="approval_code" reporter:datatype="text"/>
2076                         <field name="cash_drawer" reporter:datatype="link"/>
2077                         <field name="cc_first_name" reporter:datatype="text"/>
2078                         <field name="cc_last_name" reporter:datatype="text"/>
2079                         <field name="cc_number" reporter:datatype="text"/>
2080                         <field name="cc_order_number" reporter:datatype="text"/>
2081                         <field name="cc_type" reporter:datatype="text"/>
2082                         <field name="cc_processor" reporter:datatype="text"/>
2083                         <field name="expire_month" reporter:datatype="int" />
2084                         <field name="expire_year" reporter:datatype="int" />
2085                         <field name="id" reporter:datatype="id" />
2086                         <field name="note" reporter:datatype="text"/>
2087                         <field name="payment_ts" reporter:datatype="timestamp"/>
2088                         <field name="xact" reporter:datatype="link"/>
2089                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2090                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2091                 </fields>
2092                 <links>
2093                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2094                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2095                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2096                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2097                 </links>
2098         </class>
2099         <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">
2100                 <fields oils_persist:primary="name">
2101                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2102                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2103                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2104                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2105                 </fields>
2106                 <links/>
2107         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2108             <actions>
2109                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2110                 <retrieve/>
2111                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2112                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2113             </actions>
2114         </permacrud>
2115         </class>
2116
2117         <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">
2118                 <fields oils_persist:primary="alias">
2119                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2120                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2121                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2122                 </fields>
2123                 <links>
2124                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2125                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2126                 </links>
2127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2128             <actions>
2129                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2130                 <retrieve/>
2131                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2132                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2133             </actions>
2134         </permacrud>
2135         </class>
2136
2137         <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">
2138                 <fields oils_persist:primary="name">
2139                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2140                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2141                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2142                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2143                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2144                 </fields>
2145                 <links>
2146                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2147                 </links>
2148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2149             <actions>
2150                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2151                 <retrieve/>
2152                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2153                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2154             </actions>
2155         </permacrud>
2156         </class>
2157
2158         <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">
2159                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2160                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2161                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2162                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2163                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2164                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2165                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2166                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2167                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2168                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2169                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2170                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2171                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2172                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2173                 </fields>
2174                 <links>
2175                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2176                 </links>
2177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2178             <actions>
2179                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2180                 <retrieve/>
2181                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2182                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2183             </actions>
2184         </permacrud>
2185         </class>
2186         <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">
2187                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2188                         <field name="id" reporter:datatype="id" />
2189                         <field name="name" reporter:datatype="text"/>
2190                         <field name="xpath" reporter:datatype="text"/>
2191                         <field name="format" reporter:datatype="link"/>
2192                         <field name="first_word" reporter:datatype="bool" />
2193                 </fields>
2194                 <links/>
2195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2196             <actions>
2197                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2198                 <retrieve/>
2199                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2200                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2201             </actions>
2202         </permacrud>
2203         </class>
2204         <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">
2205                 <fields oils_persist:primary="code" oils_persist:sequence="">
2206                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2207                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2208                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2209                 </fields>
2210                 <links/>
2211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2212             <actions>
2213                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2214                 <retrieve/>
2215                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2216                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2217             </actions>
2218         </permacrud>
2219         </class>
2220         <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">
2221                 <fields oils_persist:primary="code" oils_persist:sequence="">
2222                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2223                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2224                 </fields>
2225                 <links/>
2226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2227             <actions>
2228                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2229                 <retrieve/>
2230                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2231                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2232             </actions>
2233         </permacrud>
2234         </class>
2235     <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">
2236         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2237             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2238             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2239             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2240             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2241         </fields>
2242         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2243             <actions>
2244                 <retrieve/>
2245             </actions>
2246         </permacrud>
2247     </class>
2248         <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">
2249                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2250                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2251                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2252                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2253                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2254                 </fields>
2255                 <links>
2256                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2257                 </links>
2258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2259             <actions>
2260                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2261                 <retrieve/>
2262                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2263                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2264             </actions>
2265         </permacrud>
2266         </class>
2267         <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">
2268                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2269                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2270                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2271                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2272                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2273                 </fields>
2274                 <links>
2275                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2276                 </links>
2277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2278             <actions>
2279                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2280                 <retrieve/>
2281                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2282                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2283             </actions>
2284         </permacrud>
2285         </class>
2286         <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">
2287                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2288                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2289                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2290                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2291                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2292                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2293                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2294                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2295                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2296                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2297                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2298                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2299                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2300                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2301                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2302                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2303                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2304                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2305                 </fields>
2306                 <links>
2307                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2308                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2309                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2310                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2311                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2312                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2313                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2314                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2315                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2316                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2317                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2318                 </links>
2319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2320             <actions>
2321                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2322                 <retrieve/>
2323                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2324                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2325             </actions>
2326         </permacrud>
2327         </class>
2328         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2329                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2330                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2331                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2332                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2333                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2334                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2335                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2336                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2337                 </fields>
2338                 <links>
2339                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2340                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2341         </links>
2342         </class>
2343         <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">
2344                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2345                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2346                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2347                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2348                 </fields>
2349                 <links>
2350                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2351                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2352                 </links>
2353         </class>
2354         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2355                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2356                         <field name="id" reporter:datatype="id" />
2357                         <field name="value" oils_persist:i18n="true" />
2358                 </fields>
2359                 <links/>
2360         </class>
2361         <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">
2362                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2363                         <field name="balance_owed" reporter:datatype="money" />
2364                         <field name="total_owed" reporter:datatype="money" />
2365                         <field name="total_paid" reporter:datatype="money" />
2366                         <field name="usr" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2370         </links>
2371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2372             <actions>
2373                 <retrieve permission="VIEW_USER">
2374                     <context link="usr" field="home_ou"/>
2375                 </retrieve>
2376             </actions>
2377         </permacrud>
2378         </class>
2379         <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">
2380                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2381                         <field name="collector" />
2382                         <field name="enter_time" reporter:datatype="timestamp"/>
2383                         <field name="id" reporter:datatype="id" />
2384                         <field name="location" reporter:datatype="link"/>
2385                         <field name="usr" reporter:datatype="link"/>
2386                 </fields>
2387                 <links>
2388                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2389                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2390                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2391                 </links>
2392         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2393             <actions>
2394                 <create permission="money.collections_tracker.create" context_field="location"/>
2395                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2396                 <delete permission="money.collections_tracker.create" context_field="location"/>
2397             </actions>
2398         </permacrud>
2399         </class>
2400         <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">
2401                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2402                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2403                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2404                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2405                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2406                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2407                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2408                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2409                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2410                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2411                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2412                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2413                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2414                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2415                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2416                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2417                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2418                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2419                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2420                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2421                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2422                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2423                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2424                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2425                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2426                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2427                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2428                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2429                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2430                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2431                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2432                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2433                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2434                 </fields>
2435                 <links>
2436                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2437                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2438                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2439                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2440                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2441                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2442                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2443                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2444                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2445                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2446                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2447                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2448                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2449                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2450                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2451                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2452                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2453                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2454                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2455                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2456                 </links>
2457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2458             <actions>
2459                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2460                 <retrieve/>
2461                 <update permission="UPDATE_MARC" global_required="true"/>
2462             </actions>
2463         </permacrud>
2464         </class>
2465         <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">
2466                 <fields oils_persist:primary="id">
2467                         <field name="dow_0_close" />
2468                         <field name="dow_0_open" />
2469                         <field name="dow_1_close" />
2470                         <field name="dow_1_open" />
2471                         <field name="dow_2_close" />
2472                         <field name="dow_2_open" />
2473                         <field name="dow_3_close" />
2474                         <field name="dow_3_open" />
2475                         <field name="dow_4_close" />
2476                         <field name="dow_4_open" />
2477                         <field name="dow_5_close" />
2478                         <field name="dow_5_open" />
2479                         <field name="dow_6_close" />
2480                         <field name="dow_6_open" />
2481                         <field name="id" reporter:datatype="id" />
2482                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2483                 </fields>
2484                 <links>
2485                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2486                 </links>
2487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2488             <actions>
2489                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2490                 <retrieve/>
2491                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2492                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2493             </actions>
2494         </permacrud>
2495         </class>
2496         <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">
2497                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2498                         <field name="id" reporter:datatype="id" />
2499                         <field name="record" reporter:datatype="link"/>
2500                         <field name="label" reporter:datatype="text"/>
2501                         <field name="label_sortkey" reporter:datatype="text"/>
2502                 </fields>
2503                 <links>
2504                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2505                 </links>
2506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2507             <actions>
2508                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2509                 <retrieve/>
2510                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2511                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2512             </actions>
2513         </permacrud>
2514         </class>
2515         <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">
2516                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2517                         <field name="id" reporter:datatype="id" />
2518                         <field name="target_copy" reporter:datatype="link" />
2519                         <field name="part" reporter:datatype="link"/>
2520                 </fields>
2521                 <links>
2522                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2523                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2524                 </links>
2525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2526             <actions>
2527                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2528                 <retrieve/>
2529                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2530                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2531             </actions>
2532         </permacrud>
2533         </class>
2534         <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">
2535                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2536                         <field name="close_end" reporter:datatype="timestamp" />
2537                         <field name="close_start" reporter:datatype="timestamp" />
2538                         <field name="id" reporter:datatype="id" />
2539                         <field name="org_unit" reporter:datatype="org_unit"/>
2540                         <field name="reason" reporter:datatype="text"/>
2541                 </fields>
2542                 <links>
2543                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2544                 </links>
2545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2546             <actions>
2547                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2548                 <retrieve/>
2549                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2550                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2551             </actions>
2552         </permacrud>
2553         </class>
2554         <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">
2555                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2556                         <field name="extended" reporter:datatype="interval"/>
2557                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2558                         <field name="max_renewals" reporter:datatype="int" />
2559                         <field name="name" reporter:datatype="text"/>
2560                         <field name="normal" reporter:datatype="interval"/>
2561                         <field name="shrt" reporter:datatype="interval"/>
2562                 </fields>
2563                 <links>
2564                 </links>
2565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2566             <actions>
2567                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2568                 <retrieve/>
2569                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2570                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2571             </actions>
2572         </permacrud>
2573         </class>
2574
2575         <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">
2576                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2577                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2578                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2579             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2580                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2581             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2582                 </fields>
2583                 <links>
2584             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2585                 </links>
2586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2587             <actions>
2588                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2589                 <retrieve/>
2590                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2591                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2592             </actions>
2593                 </permacrud>
2594         </class>
2595
2596         <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">
2597                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2598                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2599                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2600                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2601             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2602                 </fields>
2603                 <links>
2604                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2605                 </links>
2606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2607             <actions>
2608                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2609                 <retrieve/>
2610                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2611                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2612             </actions>
2613                 </permacrud>
2614         </class>
2615
2616         <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">
2617                 <fields oils_persist:primary="id" oils_persist:sequence="">
2618                         <field name="balance_owed" reporter:datatype="money"/>
2619                         <field name="id" reporter:datatype="id" />
2620                         <field name="last_billing_note" reporter:datatype="text"/>
2621                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2622                         <field name="last_billing_type" reporter:datatype="text"/>
2623                         <field name="last_payment_note" reporter:datatype="text"/>
2624                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2625                         <field name="last_payment_type" reporter:datatype="text"/>
2626                         <field name="total_owed" reporter:datatype="money"/>
2627                         <field name="total_paid" reporter:datatype="money"/>
2628                         <field name="usr" reporter:datatype="link"/>
2629                         <field name="xact_finish" reporter:datatype="timestamp" />
2630                         <field name="xact_start" reporter:datatype="timestamp" />
2631                         <field name="xact_type" reporter:datatype="text"/>
2632                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2633                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2634                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2635                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2636                         <field name="billing_location" reporter:datatype="link"/>
2637                 </fields>
2638                 <links>
2639                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2640                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2641                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2642                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2643                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2644                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2645                 </links>
2646         </class>
2647         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2648                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2649                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2650                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2651                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2652                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2653                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2654                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2655                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2656                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2657                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2658                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2659                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2660                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2661                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2662                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2663                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2664                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2665                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2666                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2667                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2668                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2669                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2670                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2671                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2672                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2673                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2674                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2675                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2676                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2677                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2678                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2679                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2680                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2681                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2682                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2683                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2684                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2685                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2686                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2687                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2688                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2689                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2690                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2691                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2692                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2693                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2694                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2695                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2696                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2697                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2698                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2699                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2700                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2701                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2702                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2703                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2704                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2705                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2706                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2707                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2708                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2709                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2710                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2711                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2712                 </fields>
2713                 <links>
2714                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2715                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2716                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2717                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2718                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2719                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2720                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2721                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2722                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2723                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2724                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2725                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2726                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2727                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2728                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2729                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2730                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2731                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2732                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2733                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2734                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2735                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2736                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2737                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2738                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2739                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2740                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2741                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2742                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2743                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2744                 </links>
2745         </class>
2746         <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">
2747                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2748                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2749                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2750                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2751                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2752                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2753                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2754                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2755                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2756         </fields>
2757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2758                         <actions>
2759                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2760                                 <retrieve/>
2761                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2762                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2763                         </actions>
2764                 </permacrud>
2765         </class>
2766         <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">
2767                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2768                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2769                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2770                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2771                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2772         </fields>
2773         <links>
2774                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2775                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2776                 </links>
2777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2778                         <actions>
2779                                 <retrieve permission="RUN_REPORTS">
2780                                         <context link="usr" field="home_ou" />
2781                                 </retrieve>
2782                         </actions>
2783                 </permacrud>
2784         </class>
2785         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2786                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2787                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2788                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2789                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2790                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2791                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2792                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2793         </fields>
2794         <links>
2795                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2796                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2797                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2798                 </links>
2799                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2800                         <actions>
2801                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2802                                         <context link="usr" field="home_ou" />
2803                                         <context link="ws" field="owning_lib" />
2804                                 </retrieve>
2805                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2806                                         <context link="usr" field="home_ou" />
2807                                         <context link="ws" field="owning_lib" />
2808                                 </create>
2809                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2810                                         <context link="usr" field="home_ou" />
2811                                         <context link="ws" field="owning_lib" />
2812                                 </update>
2813                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2814                                         <context link="usr" field="home_ou" />
2815                                         <context link="ws" field="owning_lib" />
2816                                 </delete>
2817                         </actions>
2818                 </permacrud>
2819         </class>
2820         <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">
2821                 <fields oils_persist:primary="name">
2822                         <field name="name" reporter:datatype="text"/>
2823                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2824                 </fields>
2825                 <links/>
2826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2827                         <actions>
2828                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2829                                 <retrieve/>
2830                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2831                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2832                         </actions>
2833                 </permacrud>
2834         </class>
2835         <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">
2836                 <fields oils_persist:primary="name">
2837                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2838                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2839                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2840                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2841                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2842                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2843                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2844                 </fields>
2845                 <links>
2846                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2847                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2848                 </links>
2849                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2850                         <actions>
2851                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2852                                 <retrieve/>
2853                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2854                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2855                         </actions>
2856                 </permacrud>
2857         </class>
2858         <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">
2859                 <fields oils_persist:primary="name">
2860                         <field name="name" reporter:datatype="text"/>
2861                         <field name="label" reporter:datatype="text"/>
2862                         <field name="description" reporter:datatype="text"/>
2863                         <field name="datatype" reporter:datatype="text"/>
2864                         <field name="view_perm" reporter:datatype="link"/>
2865                         <field name="update_perm" reporter:datatype="link"/>
2866                         <field name="fm_class" reporter:datatype="text"/>
2867                         <field name="grp" reporter:datatype="link"/>
2868                 </fields>
2869                 <links>
2870                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2871                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2872                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2873                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2874                 </links>
2875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2876                         <actions>
2877                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2878                                 <retrieve/>
2879                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2880                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2881                         </actions>
2882                 </permacrud>
2883         </class>
2884         <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">
2885                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2886                         <field name="id" />
2887                         <field name="name"  reporter:datatype="text"/>
2888                         <field name="org_unit" reporter:datatype="org_unit"/>
2889                         <field name="value"  reporter:datatype="text"/>
2890                 </fields>
2891                 <links>
2892                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2893                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2894                 </links>
2895         </class>
2896         <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">
2897                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2898                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2899                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2900                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2901                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2902                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2903                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2904                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2905                 </fields>
2906                 <links>
2907                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2908                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2909                 </links>
2910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2911             <actions>
2912                 <create permission="CREATE_COPY_NOTE">
2913                     <context link="owning_copy" field="circ_lib"/>
2914                 </create>
2915                 <retrieve permission="VIEW_COPY_NOTES">
2916                     <context link="owning_copy" field="circ_lib"/>
2917                 </retrieve>
2918                 <update permission="UPDATE_COPY_NOTE">
2919                     <context link="owning_copy" field="circ_lib"/>
2920                 </update>
2921                 <delete permission="DELETE_COPY_NOTE">
2922                     <context link="owning_copy" field="circ_lib"/>
2923                 </delete>
2924             </actions>
2925         </permacrud>
2926         </class>
2927         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2928                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2929                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2930                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2931                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2932                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2933                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2934                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2935                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2936                 </fields>
2937                 <links>
2938                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2939                 </links>
2940         </class>
2941         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2942                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2943                         <field name="fingerprint"  reporter:datatype="text"/>
2944                         <field name="id" reporter:datatype="id" />
2945                         <field name="master_record" reporter:datatype="link"/>
2946                         <field name="mods"  reporter:datatype="text"/>
2947                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2948                 </fields>
2949                 <links>
2950                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2951                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2952                 </links>
2953         </class>
2954         <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">
2955                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2956                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2957                         <field name="name"  reporter:datatype="text"/>
2958                 </fields>
2959                 <links/>
2960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2961             <actions>
2962                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2963                 <retrieve/>
2964                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2965                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2966             </actions>
2967         </permacrud>
2968         </class>
2969         <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">
2970                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2971                         <field name="code"  reporter:datatype="text"/>
2972                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2973                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2974                 </fields>
2975                 <links/>
2976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2977             <actions>
2978                 <create permission="CREATE_PERM" global_required="true"/>
2979                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2980                 <update permission="UPDATE_PERM" global_required="true"/>
2981                 <delete permission="DELETE_PERM" global_required="true"/>
2982             </actions>
2983         </permacrud>
2984         </class>
2985         <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">
2986                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2987                         <field name="id" reporter:datatype="id" />
2988                         <field name="metarecord" reporter:datatype="link"/>
2989                         <field name="source" reporter:datatype="link"/>
2990                 </fields>
2991                 <links>
2992                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2993                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2994                 </links>
2995         </class>
2996         <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">
2997                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2998                         <field name="id" reporter:datatype="id" />
2999                         <field name="field" reporter:datatype="link"/>
3000                         <field name="source" reporter:datatype="link"/>
3001                         <field name="value"  reporter:datatype="text"/>
3002                 </fields>
3003                 <links>
3004                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3005                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3006                 </links>
3007         </class>
3008         <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">
3009                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3010                         <field name="id" reporter:datatype="id" />
3011                         <field name="value" reporter:datatype="text"/>
3012                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3013                 </fields>
3014                 <links>
3015                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3016                 </links>
3017         </class>
3018         <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">
3019                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3020                         <field name="id" reporter:datatype="id" />
3021                         <field name="entry" reporter:datatype="link"/>
3022                         <field name="def" reporter:datatype="link"/>
3023                         <field name="source" reporter:datatype="link"/>
3024                 </fields>
3025                 <links>
3026                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3027                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3028                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3029                 </links>
3030         </class>
3031         <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">
3032                 <oils_persist:source_definition>
3033                         SELECT * FROM metabib.author_field_entry
3034                                                 UNION ALL
3035                         SELECT * FROM metabib.keyword_field_entry
3036                                                 UNION ALL
3037                         SELECT * FROM metabib.identifier_field_entry
3038                                                 UNION ALL
3039                         SELECT * FROM metabib.title_field_entry
3040                                                 UNION ALL
3041                         SELECT * FROM metabib.subject_field_entry
3042                                                 UNION ALL
3043                         SELECT * FROM metabib.series_field_entry
3044                 </oils_persist:source_definition>
3045                 <fields>
3046                         <field name="field" reporter:datatype="link"/>
3047                         <field name="id" reporter:datatype="id" />
3048                         <field name="source" reporter:datatype="link"/>
3049                         <field name="value"  reporter:datatype="text"/>
3050                 </fields>
3051                 <links>
3052                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3053                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3054                 </links>
3055         </class>
3056         <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">
3057                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3058                         <field name="field" reporter:datatype="link"/>
3059                         <field name="id" reporter:datatype="id" />
3060                         <field name="source" reporter:datatype="link"/>
3061                         <field name="value"  reporter:datatype="text"/>
3062                 </fields>
3063                 <links>
3064                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3065                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3066                 </links>
3067         </class>
3068         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3069                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3070                         <field name="accepting_usr" reporter:datatype="link"/>
3071                         <field name="amount" reporter:datatype="money" />
3072                         <field name="amount_collected" reporter:datatype="money" />
3073                         <field name="cash_drawer" reporter:datatype="link"/>
3074                         <field name="id" reporter:datatype="id" />
3075                         <field name="note"  reporter:datatype="text"/>
3076                         <field name="payment_ts" reporter:datatype="timestamp"/>
3077                         <field name="xact" reporter:datatype="link"/>
3078                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3079                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3080                 </fields>
3081                 <links>
3082                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3083                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3084                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3085                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3086                 </links>
3087         </class>
3088         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3089                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3090                         <field name="accepting_usr" reporter:datatype="link"/>
3091                         <field name="amount" reporter:datatype="money" />
3092                         <field name="amount_collected" reporter:datatype="money" />
3093                         <field name="id" reporter:datatype="id" />
3094                         <field name="note"  reporter:datatype="text"/>
3095                         <field name="payment_ts" reporter:datatype="timestamp"/>
3096                         <field name="xact" reporter:datatype="link"/>
3097                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3098                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3099                 </fields>
3100                 <links>
3101                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3102                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3103                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3104                 </links>
3105         </class>
3106         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3107                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3108                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3109                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3110                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3111                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3112                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3113                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3114                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3115                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3116                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3117                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3118                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3119                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3120                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3121                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3122                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3123                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3124                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3125                 </fields>
3126                 <links>
3127                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3128                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3129                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3130                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3131                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3132                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3133                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3134                 </links>
3135         </class>
3136
3137         <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">
3138                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3139                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3140                         <field name="name"  reporter:datatype="text"/>
3141                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3142                         <field name="block_list" reporter:datatype="text"/>
3143                         <field name="staff_alert" reporter:datatype="bool"/>
3144                         <field name="org_depth" reporter:datatype="int"/>
3145                 </fields>
3146                 <links/>
3147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3148             <actions>
3149                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3150                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3151                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3152                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3153             </actions>
3154         </permacrud>
3155         </class>
3156         <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">
3157                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3158                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3159                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3160                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3161                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3162                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3163                 </fields>
3164                 <links>
3165                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3166                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3167                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3168         </links>
3169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3170             <actions>
3171                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3172                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3173                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3174                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3175             </actions>
3176         </permacrud>
3177         </class>
3178         <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">
3179                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3180                         <field name="holdable" reporter:datatype="bool"/>
3181                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3182                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3183                         <field name="opac_visible" reporter:datatype="bool"/>
3184             <field name="copy_active" reporter:datatype="bool"/>
3185             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3186                 </fields>
3187                 <links/>
3188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3189             <actions>
3190                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3191                 <retrieve/>
3192                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3193                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3194             </actions>
3195         </permacrud>
3196         </class>
3197         <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">
3198                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3199                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3200                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3201                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3202                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3203                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3204                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3205                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3206                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3207                 </fields>
3208                 <links>
3209                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3210                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3211                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3212                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3213                 </links>
3214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3215                         <actions>
3216                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3217                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3218                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3219                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3220                         </actions>
3221                 </permacrud>
3222         </class>
3223         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3224                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3225                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3226                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3227                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3228                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3229                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3230                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3231                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3232                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3233                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3234                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3235                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3236                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3237                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3238                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3239                 </fields>
3240                 <links>
3241                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3242                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3243                 </links>
3244         </class>
3245         <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">
3246                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3247                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3248                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3249                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3250                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3251                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3252                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3253                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3254                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3255                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3256                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3257                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3258                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3259                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3260                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3261                 </fields>
3262                 <links>
3263                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3264                 </links>
3265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3266                         <actions>
3267                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3268                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3269                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3270                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3271                         </actions>
3272                 </permacrud>
3273         </class>
3274
3275
3276         <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">
3277                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3278                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3279                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3280                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3281                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3282                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3283                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3284                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3285                 </fields>
3286                 <links>
3287                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3288                 </links>
3289         </class>
3290
3291         <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">
3292                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3293                         <field name="call_number" />
3294                         <field name="create_date" reporter:datatype="timestamp"/>
3295                         <field name="creator" reporter:datatype="link"/>
3296                         <field name="id" reporter:datatype="id" />
3297                         <field name="pub" reporter:datatype="bool"/>
3298                         <field name="title"  reporter:datatype="text"/>
3299                         <field name="value"  reporter:datatype="text"/>
3300                 </fields>
3301                 <links>
3302                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3303                 </links>
3304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3305             <actions>
3306                 <create permission="CREATE_VOLUME_NOTE">
3307                     <context link="call_number" field="owning_lib"/>
3308                 </create>
3309                 <retrieve permission="VIEW_VOLUME_NOTES">
3310                     <context link="call_number" field="owning_lib"/>
3311                 </retrieve>
3312                 <update permission="UPDATE_VOLUME_NOTE">
3313                     <context link="call_number" field="owning_lib"/>
3314                 </update>
3315                 <delete permission="DELETE_VOLUME_NOTE">
3316                     <context link="call_number" field="owning_lib"/>
3317                 </delete>
3318             </actions>
3319         </permacrud>
3320         </class>
3321         <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">
3322                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3323                         <field name="create_date" reporter:datatype="timestamp"/>
3324                         <field name="creator" reporter:datatype="link"/>
3325                         <field name="edit_date" reporter:datatype="timestamp"/>
3326                         <field name="editor" reporter:datatype="link"/>
3327                         <field name="id" reporter:datatype="id" />
3328                         <field name="record" reporter:datatype="link"/>
3329                         <field name="value" reporter:datatype="text"/>
3330                 </fields>
3331                 <links>
3332                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3333                 </links>
3334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3335             <actions>
3336                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3337                 <retrieve/>
3338                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3339                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3340             </actions>
3341         </permacrud>
3342         </class>
3343         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3344         <oils_persist:source_definition>
3345 SELECT  usr,
3346         SUM(
3347             CASE
3348                 WHEN (
3349                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3350                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3351                 ) THEN 1
3352                 ELSE 0
3353             END
3354         ) AS out,
3355
3356         SUM(
3357             CASE
3358                 WHEN (
3359                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3360                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3361                 ) THEN 1
3362                 ELSE 0
3363             END
3364         ) AS overdue,
3365
3366         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3367         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3368         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3369   FROM  action.circulation
3370   WHERE checkin_time IS NULL
3371   GROUP BY 1
3372         </oils_persist:source_definition>
3373         <fields oils_persist:primary="usr">
3374             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3375             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3376             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3377             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3378             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3379             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3380         </fields>
3381         <links>
3382             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3383         </links>
3384         </class>
3385         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3386         <oils_persist:source_definition>
3387 SELECT  usr,
3388         ARRAY_TO_STRING(ARRAY_ACCUM(
3389             CASE
3390                 WHEN (
3391                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3392                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3393                 ) THEN id
3394                 ELSE 0
3395             END
3396         ),',') AS out,
3397
3398         ARRAY_TO_STRING(ARRAY_ACCUM(
3399             CASE
3400                 WHEN (
3401                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3402                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3403                 ) THEN id
3404                 ELSE 0
3405             END
3406         ),',') AS overdue,
3407
3408         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3409         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3410         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3411   FROM  action.circulation
3412   WHERE checkin_time IS NULL
3413   GROUP BY 1
3414         </oils_persist:source_definition>
3415         <fields oils_persist:primary="usr">
3416             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3417             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3418             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3419             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3420             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3421             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3422         </fields>
3423         <links>
3424             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3425         </links>
3426         </class>
3427         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3428                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3429                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3430                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3431                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3432                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3433                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3434                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3435                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3436                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3437                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3438                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3439                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3440                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3441                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3442                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3443                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3444                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3445                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3446                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3447                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3448                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3449                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3450                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3451                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3452                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3453                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3454                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3455                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3456                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3457                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3458                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3459                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3460                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3461                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3462                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3463                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3464                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3465                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3466                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3467                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3468                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3469                 </fields>
3470                 <links>
3471                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3472                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3473                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3474                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3475                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3476                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3477                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3478                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3479                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3480                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3481                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3482                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3483                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3484                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3485                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3486                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3487                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3488                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3489                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3490                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3491                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3492                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3493                 </links>
3494         </class>
3495         <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">
3496                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3497                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3498                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3499                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3500                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3501                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3502                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3503                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3504                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3505                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3506                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3507                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3508                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3509                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3510                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3511                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3512                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3513                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3514                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3515                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3516                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3517                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3518                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3519                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3520                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3521                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3522                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3523                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3524                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3525                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3526                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3527                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3528                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3529                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3530                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3531                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3532                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3533                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3534                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3535                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3536                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3537                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3538                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3539                 </fields>
3540                 <links>
3541                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3542                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3543                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3544                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3545                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3546                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3547                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3548                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3549                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3550                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3551                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3552                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3553                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3554                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3555                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3556                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3557                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3558                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3559                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3560                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3561                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3562                 </links>
3563         </class>
3564         <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">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3566                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3567                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3568                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3569                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3570                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3571                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3572                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3573                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3574                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3575                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3576                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3577                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3578                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3579                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3580                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3581                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3582                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3583                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3584                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3585                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3586                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3587                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3588                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3589                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3590                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3591                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3592                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3593                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3594                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3595                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3596                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3597                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3598                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3599                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3600                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3601                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3602                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3603                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3604                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3605                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3606                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3607                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3608                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3609                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3610                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3611                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3612                 </fields>
3613                 <links>
3614                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3615                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3616                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3617                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3618                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3619                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3620                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3621                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3622                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3623                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3624                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3625                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3626                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3627                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3628                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3629                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3630                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3631                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3632                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3633                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3634                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3635                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3636                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3637                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3638                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3639                 </links>
3640         </class>
3641
3642         <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">
3643                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3644                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3645                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3646                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3647                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3648                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3649                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3650                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3651                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3652                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3653                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3654                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3655                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3656                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3657                 </fields>
3658                 <links>
3659                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3660                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3661                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3662                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3663                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3664                 </links>
3665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3666                         <actions>
3667                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3668                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3669                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3670                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3671                         </actions>
3672                 </permacrud>
3673         </class>
3674
3675         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3676                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3677                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3678                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3679                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3680                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3681                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3682                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3683                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3684                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3685                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3686                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3687                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3688                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3689                 </fields>
3690                 <links>
3691                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3692                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3693                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3694                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3695                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3696                 </links>
3697                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3698                         <actions>
3699                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3700                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3701                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3702                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3703                         </actions>
3704                 </permacrud>
3705         </class>
3706         
3707         <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">
3708                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3709                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3710                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3711                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3712                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3713                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3714                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3715                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3716                 </fields>
3717                 <links>
3718                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3719                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3720                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3721                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3722                 </links>
3723                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3724                         <actions>
3725                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3726                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3727                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3728                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3729                         </actions>
3730                 </permacrud>
3731         </class>
3732         
3733         <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">
3734                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3735                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3736                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3737                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3738                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3739                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3740                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3741                 </fields>
3742                 <links>
3743                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3744                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3745                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3746                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3747                 </links>
3748                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3749                         <actions>
3750                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3751                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3752                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3753                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3754                         </actions>
3755                 </permacrud>
3756         </class>
3757         
3758         <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">
3759                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3760                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3761                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3762                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3763                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3764                 </fields>
3765                 <links>
3766                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3767                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3768                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3769                 </links>
3770                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3771                         <actions>
3772                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3773                     <context link="resource" field="owner" />
3774                 </create>
3775                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3776                     <context link="resource" field="owner" />
3777                 </retrieve>
3778                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3779                     <context link="resource" field="owner" />
3780                 </update>
3781                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3782                     <context link="resource" field="owner" />
3783                 </delete>
3784                         </actions>
3785                 </permacrud>
3786         </class>
3787         
3788         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3789                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3790                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3791                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3792                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3793                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3794                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3795                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3796                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3797                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3798                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3799                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3800                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3801                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3802                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3803                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3804                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3805                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3806                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3807                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3808                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3809                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3810                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3811                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3812                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3813                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3814                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3815                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3816                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3817                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3818                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3819                 </fields>
3820                 <links>
3821                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3822                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3823                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3824                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3825                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3826                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3827                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3828                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3829                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3830                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3831                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3832                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3833                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3834                 </links>
3835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3836                         <actions>
3837                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3838                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3839                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3840                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3841                         </actions>
3842                 </permacrud>
3843         </class>
3844         
3845         <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">
3846                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3847                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3848                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3849                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3850                 </fields>
3851                 <links>
3852                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3853                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3854                 </links>
3855                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3856                         <actions>
3857                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3858                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3859                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3860                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3861                         </actions>
3862                 </permacrud>
3863         </class>
3864
3865         <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">
3866                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3867                         <field name="bucket" reporter:datatype="link"/>
3868                         <field name="id" reporter:datatype="id" />
3869                         <field name="target_call_number" reporter:datatype="link" />
3870                         <field name="create_time" reporter:datatype="timestamp" />
3871                         <field name="pos" reporter:datatype="int" />
3872                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3873                 </fields>
3874                 <links>
3875                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3876                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3877             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3878                 </links>
3879         </class>
3880         <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">
3881                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3882                         <field name="id" reporter:datatype="id" />
3883                         <field name="item" reporter:datatype="link"/>
3884                         <field name="note" reporter:datatype="text" />
3885                 </fields>
3886                 <links>
3887                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3888                 </links>
3889         </class>
3890         <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">
3891                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3892                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3893                         <field name="btype" reporter:datatype="text"/>
3894                         <field name="id" reporter:datatype="id" />
3895                         <field name="name" reporter:datatype="text"/>
3896                         <field name="description" reporter:datatype="text"/>
3897                         <field name="owner" reporter:datatype="link"/>
3898                         <field name="pub" reporter:datatype="bool"/>
3899                         <field name="create_time" reporter:datatype="timestamp" />
3900                 </fields>
3901                 <links>
3902                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3903                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3904                 </links>
3905         </class>
3906         <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">
3907                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3908                         <field name="id" reporter:datatype="id" />
3909                         <field name="bucket" reporter:datatype="link"/>
3910                         <field name="note" reporter:datatype="text" />
3911                 </fields>
3912                 <links>
3913                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3914                 </links>
3915         </class>
3916         <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">
3917                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3918                         <field name="hold" reporter:datatype="link"/>
3919                         <field name="id" reporter:datatype="id" />
3920                         <field name="target_copy" reporter:datatype="link"/>
3921                 </fields>
3922                 <links>
3923                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3924                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3925                 </links>
3926         </class>
3927         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3928                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3929                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3930                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3931                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3932                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3933                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3934                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3935                 </fields>
3936                 <links>
3937                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3938                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3939                 </links>
3940         </class>
3941         <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">
3942                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3943                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3944                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3945                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3946                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3947                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3948                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3949                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3950                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3951                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3952                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3953                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3954                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
3955                 </fields>
3956                 <links>
3957                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3958                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3959                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3960                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3961                 </links>
3962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3963             <actions>
3964                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3965                 <retrieve/>
3966                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3967                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3968             </actions>
3969         </permacrud>
3970         </class>
3971         <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">
3972                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
3973                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3974                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3975                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3976                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
3977             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3978             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
3979             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3980                 </fields>
3981                 <links>
3982                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3983                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
3984                 </links>
3985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3986             <actions>
3987                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3988                 <retrieve/>
3989                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3990                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3991             </actions>
3992         </permacrud>
3993         </class>
3994         <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">
3995                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
3996                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3997             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
3998             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
3999                 </fields>
4000                 <links>
4001                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4002                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4003                 </links>
4004         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4005             <actions>
4006                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4007                                         <context link="lgroup" field="owner" />
4008                 </create>
4009                 <retrieve/>
4010                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4011                                         <context link="lgroup" field="owner" />
4012                 </update>
4013                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4014                                         <context link="lgroup" field="owner" />
4015                 </delete>
4016             </actions>
4017         </permacrud>
4018         </class>
4019
4020     <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">
4021         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4022             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4023             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4024             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4025             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4026         </fields>
4027         <links>
4028             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4029             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4030         </links>
4031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4032             <actions>
4033                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4034                 <retrieve/>
4035                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4036                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4037             </actions>
4038         </permacrud>
4039     </class>
4040
4041         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4042                 <fields>
4043                         <field name="sre_id" oils_persist:virtual="true" />
4044                         <field name="location" oils_persist:virtual="true" />
4045                         <field name="owning_lib" oils_persist:virtual="true" />
4046                         <field name="basic_holdings" oils_persist:virtual="true" />
4047                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4048                         <field name="supplement_holdings" oils_persist:virtual="true" />
4049                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4050                         <field name="index_holdings" oils_persist:virtual="true" />
4051                         <field name="index_holdings_add" oils_persist:virtual="true" />
4052                         <field name="online" oils_persist:virtual="true" />
4053                         <field name="missing" oils_persist:virtual="true" />
4054                         <field name="incomplete" oils_persist:virtual="true" />
4055                 </fields>
4056         </class>
4057
4058         <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">
4059                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4060                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4061                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4062                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4063                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4064                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4065                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4066                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4067                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4068                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4069                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4070                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4071                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4072                 </fields>
4073                 <links>
4074                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4075                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4076                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4077                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4078                 </links>
4079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4080                         <actions>
4081                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4082                                 <retrieve/>
4083                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4084                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4085                         </actions>
4086                 </permacrud>
4087         </class>
4088
4089         <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">
4090                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4091                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4092                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4093                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4094                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4095                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4096                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4097                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4098                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4099                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4100                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4101                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4102                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4103                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4104                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4105                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4106                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4107                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4108                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4109                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4110                 </fields>
4111                 <links>
4112                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4113                 </links>
4114                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4115                         <actions>
4116                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4117                                         <context link="subscription" field="owning_lib" />
4118                                 </create>
4119                                 <retrieve />
4120                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4121                                         <context link="subscription" field="owning_lib" />
4122                                 </update>
4123                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4124                                         <context link="subscription" field="owning_lib" />
4125                                 </delete>
4126                         </actions>
4127                 </permacrud>
4128         </class>
4129
4130         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4131                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4132                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4133                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4134                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4135                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4136                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4137                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4138                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4139                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4140                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4141                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4142                 </fields>
4143                 <links>
4144                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4145                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4146                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4147                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4148                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4149                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4150                 </links>
4151                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4152                         <actions>
4153                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4154                                 <retrieve />
4155                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4156                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4157                         </actions>
4158                 </permacrud>
4159         </class>
4160
4161         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4162                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4163                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4164                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4165                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4166                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4167                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4168                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4169                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4170                 </fields>
4171                 <links>
4172                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4173                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4174                 </links>
4175         </class>
4176
4177         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4178                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4179                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4180                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4181                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4182                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4183                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4184                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4185                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4186                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4187                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4188                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4189                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4190                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4191                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4192                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4193                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4194                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4195                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4196                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4197                 </fields>
4198                 <links>
4199                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4200                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4201                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4202                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4203                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4204                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4205                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4206                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4207                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4208                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4209                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4210                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4211                 </links>
4212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4213                         <actions>
4214                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4215                                 <retrieve />
4216                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4217                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4218                         </actions>
4219                 </permacrud>
4220         </class>
4221
4222         <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">
4223                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4224                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4225                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4226                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4227                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4228                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4229                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4230                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4231                 </fields>
4232                 <links>
4233                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4234                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4235                 </links>
4236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4237                         <actions>
4238                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4239                                         <context link="distribution" field="holding_lib" />
4240                                 </create>
4241                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4242                                         <context link="distribution" field="holding_lib" />
4243                                 </retrieve>
4244                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4245                                         <context link="distribution" field="holding_lib" />
4246                                 </update>
4247                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4248                                         <context link="distribution" field="holding_lib" />
4249                                 </delete>
4250                         </actions>
4251                 </permacrud>
4252         </class>
4253
4254         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4255                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4256                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4257                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4258                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4259                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4260                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4261                 </fields>
4262                 <links>
4263                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4264                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4265                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4266                 </links>
4267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4268                         <actions>
4269                                 <create permission="ADMIN_SERIAL_STREAM">
4270                                         <context link="distribution" field="holding_lib" />
4271                                 </create>
4272                                 <retrieve />
4273                                 <update permission="ADMIN_SERIAL_STREAM">
4274                                         <context link="distribution" field="holding_lib" />
4275                                 </update>
4276                                 <delete permission="ADMIN_SERIAL_STREAM">
4277                                         <context link="distribution" field="holding_lib" />
4278                                 </delete>
4279                         </actions>
4280                 </permacrud>
4281         </class>
4282
4283         <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">
4284                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4285                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4286                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4287                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4288                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4289                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4290                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4291                 </fields>
4292                 <links>
4293                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4294                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4295                 </links>
4296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4297                         <actions>
4298                                 <create permission="ADMIN_SERIAL_STREAM">
4299                                         <context link="stream" jump="distribution" field="holding_lib" />
4300                                 </create>
4301                                 <retrieve permission="RECEIVE_SERIAL">
4302                                         <context link="stream" jump="distribution" field="holding_lib" />
4303                                 </retrieve>
4304                                 <update permission="ADMIN_SERIAL_STREAM">
4305                                         <context link="stream" jump="distribution" field="holding_lib" />
4306                                 </update>
4307                                 <delete permission="ADMIN_SERIAL_STREAM">
4308                                         <context link="stream" jump="distribution" field="holding_lib" />
4309                                 </delete>
4310                         </actions>
4311                 </permacrud>
4312         </class>
4313
4314         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4315                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4316                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4317                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4318                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4319                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4320                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4321                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4322                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4323                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4324                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4325                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4326                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4327                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4328                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4329                 </fields>
4330                 <links>
4331                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4332                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4333                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4334                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4335                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4336                 </links>
4337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4338                         <actions>
4339                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4340                                         <context link="subscription" field="owning_lib" />
4341                                 </create>
4342                                 <retrieve/>
4343                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4344                                         <context link="subscription" field="owning_lib" />
4345                                 </update>
4346                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4347                                         <context link="subscription" field="owning_lib" />
4348                                 </delete>
4349                         </actions>
4350                 </permacrud>
4351         </class>
4352
4353         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4354                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4355                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4356                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4357                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4358                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4359                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4360                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4361                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4362                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4363                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4364                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4365                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4366                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4367                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4368                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4369                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4370                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4371                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4372                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4373                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4374                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4375                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4376                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4377                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4378                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4379                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4380                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4381                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4382                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4383                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4384                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4385                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4386                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4387                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4388                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4389                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4390                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4391                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4392                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4393                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4394                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4395                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4396                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4397                 </fields>
4398                 <links>
4399                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4400                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4401                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4402                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4403                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4404                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4405                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4406                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4407                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4408                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4409                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4410                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4411                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4412                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4413                 </links>
4414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4415                         <actions>
4416                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4417                                 <retrieve/>
4418                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4419                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4420                         </actions>
4421                 </permacrud>
4422         </class>
4423
4424         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4425                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4426                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4427                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4428                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4429                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4430                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4431                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4432                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4433                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4434                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4435                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4436                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4437                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4438                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4439                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4440                 </fields>
4441                 <links>
4442                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4443                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4444                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4445                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4446                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4447                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4448                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4449                 </links>
4450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4451                         <actions>
4452                                 <create permission="ADMIN_SERIAL_ITEM">
4453                                         <context link="stream" jump="distribution" field="holding_lib" />
4454                                 </create>
4455                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4456                                         <context link="stream" jump="distribution" field="holding_lib" />
4457                                 </retrieve>
4458                                 <update permission="ADMIN_SERIAL_ITEM">
4459                                         <context link="stream" jump="distribution" field="holding_lib" />
4460                                 </update>
4461                                 <delete permission="ADMIN_SERIAL_ITEM">
4462                                         <context link="stream" jump="distribution" field="holding_lib" />
4463                                 </delete>
4464                         </actions>
4465                 </permacrud>
4466         </class>
4467
4468         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4469                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4470                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4471                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4472                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4473                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4474                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4475                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4476                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4477                 </fields>
4478                 <links>
4479                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4480                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4481                 </links>
4482                 <!-- Not available via PCRUD at this time -->
4483         </class>
4484         <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">
4485                 <fields>
4486                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4487                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4488                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4489                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4490                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4491                 </fields>
4492                 <links>
4493                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4494                 </links>
4495         </class>
4496         <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">
4497                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4498                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4499                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4500                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4501                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4502                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4503                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4504                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4505                 </fields>
4506                 <links>
4507                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4508                 </links>
4509         </class>
4510         <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">
4511                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4512                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4513                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4514                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4515                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4516                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4517                 </fields>
4518                 <links>
4519                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4520                 </links>
4521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4522                         <actions>
4523                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4524                                         <context link="distribution" field="holding_lib" />
4525                                 </create>
4526                                 <retrieve/>
4527                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4528                                         <context link="distribution" field="holding_lib" />
4529                                 </update>
4530                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4531                                         <context link="distribution" field="holding_lib" />
4532                                 </delete>
4533                         </actions>
4534                 </permacrud>
4535         </class>
4536
4537         <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">
4538                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4539                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4540                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4541                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4542                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4543                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4544                 </fields>
4545                 <links>
4546                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4547                 </links>
4548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4549                         <actions>
4550                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4551                                         <context link="distribution" field="holding_lib" />
4552                                 </create>
4553                                 <retrieve/>
4554                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4555                                         <context link="distribution" field="holding_lib" />
4556                                 </update>
4557                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4558                                         <context link="distribution" field="holding_lib" />
4559                                 </delete>
4560                         </actions>
4561                 </permacrud>
4562         </class>
4563
4564         <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">
4565                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4566                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4567                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4568                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4569                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4570                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4571                 </fields>
4572                 <links>
4573                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4574                 </links>
4575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4576                         <actions>
4577                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4578                                         <context link="distribution" field="holding_lib" />
4579                                 </create>
4580                                 <retrieve/>
4581                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4582                                         <context link="distribution" field="holding_lib" />
4583                                 </update>
4584                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4585                                         <context link="distribution" field="holding_lib" />
4586                                 </delete>
4587                         </actions>
4588                 </permacrud>
4589         </class>
4590
4591         <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">
4592                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4593                         <field name="id" reporter:datatype="id" />
4594                         <field name="owning_copy" reporter:datatype="link"/>
4595                         <field name="stat_cat" reporter:datatype="link"/>
4596                         <field name="stat_cat_entry" reporter:datatype="link"/>
4597                 </fields>
4598                 <links>
4599                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4600                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4601                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4602                 </links>
4603         </class>
4604         <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">
4605                 <fields oils_persist:primary="code">
4606                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4607                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4608                 </fields>
4609                 <links/>
4610         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4611             <actions>
4612                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4613                 <retrieve/>
4614                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4615                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4616             </actions>
4617         </permacrud>
4618         </class>
4619         <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">
4620                 <fields oils_persist:primary="code">
4621                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4622                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4623                 </fields>
4624                 <links/>
4625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4626             <actions>
4627                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4628                 <retrieve/>
4629                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4630                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4631             </actions>
4632         </permacrud>
4633         </class>
4634         <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">
4635                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4636                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4637                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4638                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4639                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4640                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4641                 </fields>
4642                 <links>
4643             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4644         </links>
4645         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4646             <actions>
4647                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4648                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4649                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4650                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4651             </actions>
4652         </permacrud>
4653         </class>
4654         <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">
4655                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4656                         <field name="id" reporter:datatype="id" />
4657                         <field name="name" reporter:datatype="text"/>
4658                 </fields>
4659                 <links/>
4660         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4661             <actions>
4662                 <create permission="CREATE_LASSO" global_required="true"/>
4663                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4664                 <update permission="UPDATE_LASSO" global_required="true"/>
4665                 <delete permission="DELETE_LASSO" global_required="true"/>
4666             </actions>
4667         </permacrud>
4668         </class>
4669         <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">
4670                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4671                         <field name="id" reporter:datatype="id" />
4672                         <field name="lasso" reporter:datatype="link"/>
4673                         <field name="org_unit" reporter:datatype="org_unit"/>
4674                 </fields>
4675                 <links>
4676                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4677                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4678                 </links>
4679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4680             <actions>
4681                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4682                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4683                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4684                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4685             </actions>
4686         </permacrud>
4687         </class>
4688         <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">
4689                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4690                         <field name="id" reporter:datatype="id" />
4691                         <field name="from_org" reporter:datatype="org_unit"/>
4692                         <field name="to_org" reporter:datatype="org_unit"/>
4693                         <field name="prox" reporter:datatype="int" />
4694                 </fields>
4695                 <links>
4696                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4697                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4698                 </links>
4699         </class>
4700         <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">
4701                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4702                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4703                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4704                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4705                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4706                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4707                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4708                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4709                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4710                 </fields>
4711                 <links/>
4712         </class>
4713         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4714                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4715                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4716                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4717                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4718                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4719                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4720                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4721                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4723                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4724                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4725                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4726                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4727                 </fields>
4728                 <links>
4729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4730                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4731                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4732                 </links>
4733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4734             <actions>
4735                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4736                 <retrieve/>
4737                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4738                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4739             </actions>
4740         </permacrud>
4741         </class>
4742         <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">
4743                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4744                         <field name="address_type"  reporter:datatype="text"/>
4745                         <field name="city"  reporter:datatype="text"/>
4746                         <field name="country"  reporter:datatype="text"/>
4747                         <field name="county"  reporter:datatype="text"/>
4748                         <field name="id" reporter:datatype="id" />
4749                         <field name="org_unit" reporter:datatype="org_unit"/>
4750                         <field name="post_code"  reporter:datatype="text"/>
4751                         <field name="state"  reporter:datatype="text"/>
4752                         <field name="street1"  reporter:datatype="text"/>
4753                         <field name="street2"  reporter:datatype="text"/>
4754                         <field name="valid" reporter:datatype="bool"/>
4755                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4756                 </fields>
4757                 <links>
4758                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4759                 </links>
4760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4761             <actions>
4762                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4763                 <retrieve/>
4764                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4765                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4766             </actions>
4767         </permacrud>
4768         </class>
4769         <!-- A note: Please update alhr when updating ahr -->
4770         <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">
4771                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4772                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4773                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4774                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4775                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4776                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4777                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4778                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4779                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4780                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4781                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4782                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4783                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4784                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4785                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4786                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="text"/>
4787                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4788                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4789                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4790                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4791                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4792                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4793                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4794                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4795                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4796                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4797                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4798                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4799                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4800                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4801                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4802                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4803                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4804                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4805                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4806                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4807                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4808                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4809                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4810                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4811                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4812                 </fields>
4813                 <links>
4814                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4815                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4816                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4817                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4818                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4819                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4820                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4821                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4822                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4823                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4824                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4825                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4826                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4827                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4828                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4829                         <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
4830                 </links>
4831         </class>
4832         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4833                 <oils_persist:source_definition>
4834                         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)
4835                 </oils_persist:source_definition>
4836                 <fields oils_persist:primary="id">
4837                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4838                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4839                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4840                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4841                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4842                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4843                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4844                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4845                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4846                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4847                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4848                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4849                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4850                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4851                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4852                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4853                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4854                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4855                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4856                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4857                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4858                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4859                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4860                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4861                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4862                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4863                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4864                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4865                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4866                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4867                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4868                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4869                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4870                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4871                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4872                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4873                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4874                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4875                 </fields>
4876                 <links>
4877                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4878                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4879                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4880                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4881                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4882                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4883                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4884                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4885                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4886                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4887                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4888                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4889                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4890                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4891                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4892                 </links>
4893         </class>
4894
4895         <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">
4896                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4897                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4898                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4899                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4900                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4901                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4902                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4903                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4904                 </fields>
4905                 <links>
4906                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4907                 </links>
4908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4909                         <actions>
4910                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4911                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4912                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4913                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4914                         </actions>
4915                 </permacrud>
4916         </class>
4917         <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">
4918                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4919                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4920                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4921                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4922                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4923                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4924                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4925                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4926                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4927                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4928                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4929                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4930                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4931                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4932                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4933                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4934                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4935                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4936                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4937                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4938                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4939                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4940                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4941                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4942                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4943                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4945                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4946                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4947                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4948                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4949                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4950                 </fields>
4951                 <links>
4952                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4953                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4954                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4955                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4956                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4957                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4958                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4959                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4960                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4961                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4962                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4963                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4964                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4965                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4966                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4967                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4968                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4969                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4970                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4971                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4972                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4973                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4974                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4975                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4976                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4977                 </links>
4978         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4979             <actions>
4980                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4981                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4982                     <context field="id"/>
4983                     <context field="parent_ou"/>
4984                                 </retrieve>
4985                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4986                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4987             </actions>
4988         </permacrud>
4989         </class>
4990         <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">
4991                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
4992                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4993                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4994                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
4995                 </fields>
4996                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4997                         <actions>
4998                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
4999                                 <retrieve/>
5000                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5001                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5002                         </actions>
5003                 </permacrud>
5004         </class>
5005         <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">
5006                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5007                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5008                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5009                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5010                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5011                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5012                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5013                 </fields>
5014                 <links>
5015                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5016                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5017                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5018                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5019                 </links>
5020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5021                         <actions>
5022                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5023                                 <retrieve/>
5024                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5025                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5026                         </actions>
5027                 </permacrud>
5028         </class>
5029         <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">
5030                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5031                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5032                         <field name="btype" reporter:datatype="text"/>
5033                         <field name="id" reporter:datatype="id" />
5034                         <field name="name"  reporter:datatype="text"/>
5035                         <field name="description" reporter:datatype="text"/>
5036                         <field name="owner" reporter:datatype="link"/>
5037                         <field name="pub" reporter:datatype="bool"/>
5038                         <field name="create_time" reporter:datatype="timestamp" />
5039                 </fields>
5040                 <links>
5041                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5042                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5043                 </links>
5044         </class>
5045         <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">
5046                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5047                         <field name="id" reporter:datatype="id" />
5048                         <field name="bucket" reporter:datatype="link"/>
5049                         <field name="note" reporter:datatype="text" />
5050                 </fields>
5051                 <links>
5052                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5053                 </links>
5054         </class>
5055         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5056                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5057                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5058                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5059                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5060                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5061                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5062                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5063                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5064                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5065                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5066                 </fields>
5067                 <links>
5068                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5069                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5070                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5071                 </links>
5072         </class>
5073         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5074                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5075                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5076                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5077                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5078                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5079                 </fields>
5080                 <links>
5081                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5082                 </links>
5083         </class>
5084     <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">
5085         <fields oils_persist:primary="field">
5086             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5087             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5088             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5089         </fields>
5090         <links/>
5091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5092             <actions>
5093                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5094                 <retrieve />
5095                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5096                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5097             </actions>
5098         </permacrud>
5099     </class>
5100         <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">
5101                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5102                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5103                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5104                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5105                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5106                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5107                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5108                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5109                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5110                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5111                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5112                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5113                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5114                 </fields>
5115                 <links>
5116                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5117                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5118                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5119                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5120                 </links>
5121         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5122             <actions>
5123                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5124                 <retrieve />
5125                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5126                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5127             </actions>
5128         </permacrud>
5129         </class>
5130         <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">
5131                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5132                         <field name="field" reporter:datatype="link"/>
5133                         <field name="id" reporter:datatype="id" />
5134                         <field name="source" reporter:datatype="link"/>
5135                         <field name="value"  reporter:datatype="text"/>
5136                 </fields>
5137                 <links>
5138                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5139                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5140                 </links>
5141         </class>
5142         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5143                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5144                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5145                         <field name="btype" reporter:datatype="text"/>
5146                         <field name="id" reporter:datatype="id" />
5147                         <field name="name"  reporter:datatype="text"/>
5148                         <field name="description" reporter:datatype="text"/>
5149                         <field name="owner" reporter:datatype="link"/>
5150                         <field name="pub" reporter:datatype="bool"/>
5151                         <field name="create_time" reporter:datatype="timestamp" />
5152                 </fields>
5153                 <links>
5154                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5155                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5156                 </links>
5157         </class>
5158         <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">
5159                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5160                         <field name="id" reporter:datatype="id" />
5161                         <field name="bucket" reporter:datatype="link"/>
5162                         <field name="note" reporter:datatype="text" />
5163                 </fields>
5164                 <links>
5165                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5166                 </links>
5167         </class>
5168         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5169                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5170                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5171                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5172                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5173                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5174                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5175                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5176                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5177                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5178                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5179                 </fields>
5180                 <links>
5181                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5182                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5183                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5184                 </links>
5185         </class>
5186         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5187                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5188                         <field name="id" reporter:datatype="id" />
5189                         <field name="ind1" />
5190                         <field name="ind2" />
5191                         <field name="record" />
5192                         <field name="subfield" />
5193                         <field name="tag" />
5194                         <field name="value" />
5195                 </fields>
5196                 <links>
5197                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5198                 </links>
5199         </class>
5200         <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">
5201                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5202                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5203                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5204                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5205                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5206                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5207                 </fields>
5208                 <links>
5209                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5210                 </links>
5211         </class>
5212         <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">
5213                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5214                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5215                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5216                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5217                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5218                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5219                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5220                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5221                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5222                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5223                 </fields>
5224                 <links>
5225                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5226                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5227                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5228                 </links>
5229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5230             <actions>
5231                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5232                 <retrieve/>
5233                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5234                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5235             </actions>
5236         </permacrud>
5237         </class>
5238         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5239                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5240                         <field name="create_date" reporter:datatype="timestamp"/>
5241                         <field name="creator" reporter:datatype="link"/>
5242                         <field name="edit_date" reporter:datatype="timestamp"/>
5243                         <field name="editor" reporter:datatype="link"/>
5244                         <field name="id" reporter:datatype="id" />
5245                         <field name="pub" reporter:datatype="bool"/>
5246                         <field name="record" reporter:datatype="link"/>
5247                         <field name="value"  reporter:datatype="text"/>
5248                 </fields>
5249                 <links>
5250                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5251                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5252                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5253                 </links>
5254         </class>
5255         <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">
5256                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5257                         <field name="balance_owed" reporter:datatype="money" />
5258                         <field name="total_owed" reporter:datatype="money" />
5259                         <field name="total_paid" reporter:datatype="money" />
5260                         <field name="usr" reporter:datatype="link"/>
5261                 </fields>
5262                 <links>
5263                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5264                 </links>
5265         </class>
5266         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5267                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5268                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5269                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5270                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5271                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5272                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5273                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5274                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5275                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5276                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5277                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5278                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5279                 </fields>
5280                 <links>
5281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5282                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5283                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5284                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5285                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5286                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5287                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5288                 </links>
5289         </class>
5290         <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">
5291                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5292                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5293                         <field name="quality" reporter:datatype="int" />
5294                         <field name="source" reporter:datatype="text"/>
5295                         <field name="transcendant" reporter:datatype="bool"/>
5296                         <field name="can_have_copies" reporter:datatype="bool"/>
5297                 </fields>
5298                 <links/>
5299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5300             <actions>
5301                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5302                 <retrieve/>
5303                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5304                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5305             </actions>
5306         </permacrud>
5307         </class>
5308         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5309                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5310                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5311                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5312                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5313                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5314                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5315                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5319                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5320                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5321                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5322                 </fields>
5323                 <links>
5324                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5325                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5326                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5327                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5328                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5329                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5330                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5331                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5332                 </links>
5333         </class>
5334         <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">
5335                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5336                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5337                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5338                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5339                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5340                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5341                 </fields>
5342                 <links>
5343                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5344                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5345                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5346                 </links>
5347         </class>
5348         <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">
5349                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5350                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5351                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5352                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5353                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5354                 </fields>
5355                 <links>
5356                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5357                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5358                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5359                 </links>
5360         </class>
5361         <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">
5362                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5363                         <field name="bucket" reporter:datatype="link"/>
5364                         <field name="id" reporter:datatype="id" />
5365                         <field name="target_user" reporter:datatype="link"/>
5366                         <field name="create_time" reporter:datatype="timestamp" />
5367                         <field name="pos" reporter:datatype="int" />
5368                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5369                 </fields>
5370                 <links>
5371                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5372                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5373             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5374                 </links>
5375         </class>
5376         <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">
5377                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5378                         <field name="id" reporter:datatype="id" />
5379                         <field name="item" reporter:datatype="link"/>
5380                         <field name="note" reporter:datatype="text" />
5381                 </fields>
5382                 <links>
5383                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5384                 </links>
5385         </class>
5386         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5387                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5388                         <field name="balance_owed" reporter:datatype="money" />
5389                         <field name="total_owed" reporter:datatype="money" />
5390                         <field name="total_paid" reporter:datatype="money" />
5391                         <field name="usr" reporter:datatype="link"/>
5392                 </fields>
5393                 <links>
5394                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5395                 </links>
5396         </class>
5397         <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">
5398                 <fields oils_persist:primary="code" oils_persist:sequence="">
5399                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5400                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5401                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5402                 </fields>
5403                 <links/>
5404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5405             <actions>
5406                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5407                 <retrieve/>
5408                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5409                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5410             </actions>
5411         </permacrud>
5412         </class>
5413         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5414                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5415                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5416                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5417                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5418                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5419                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5420                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5421                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5422                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5423                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5424                 </fields>
5425                 <links>
5426                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5427                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5428                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5429                 </links>
5430         </class>
5431         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5432                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5433                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5434                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5435                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5436                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5437                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5438                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5439                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5440                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5441                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5442                 </fields>
5443                 <links>
5444                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5445                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5446                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5447                 </links>
5448         </class>
5449         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5450                 <fields oils_persist:primary="id" oils_persist:sequence="">
5451                         <field name="checkin_lib" reporter:datatype="link"/>
5452                         <field name="checkin_staff" reporter:datatype="link"/>
5453                         <field name="checkin_time" reporter:datatype="timestamp"/>
5454                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5455                         <field name="circ_staff" reporter:datatype="link"/>
5456                         <field name="desk_renewal" reporter:datatype="bool"/>
5457                         <field name="due_date" reporter:datatype="timestamp"/>
5458                         <field name="duration" reporter:datatype="interval"/>
5459                         <field name="duration_rule" reporter:datatype="link"/>
5460                         <field name="fine_interval" reporter:datatype="interval"/>
5461                         <field name="id" reporter:datatype="id" />
5462                         <field name="max_fine" reporter:datatype="money" />
5463                         <field name="max_fine_rule" reporter:datatype="link"/>
5464                         <field name="opac_renewal" reporter:datatype="bool"/>
5465                         <field name="phone_renewal" reporter:datatype="bool"/>
5466                         <field name="recurring_fine" reporter:datatype="money" />
5467                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5468                         <field name="renewal_remaining" reporter:datatype="int" />
5469             <field name="grace_period" reporter:datatype="interval" />
5470                         <field name="stop_fines" reporter:datatype="text"/>
5471                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5472                         <field name="target_copy" reporter:datatype="link"/>
5473                         <field name="usr" reporter:datatype="link"/>
5474                         <field name="xact_finish" reporter:datatype="timestamp" />
5475                         <field name="xact_start" reporter:datatype="timestamp" />
5476                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5477                 </fields>
5478                 <links>
5479                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5480                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5481                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5482                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5483                 </links>
5484         </class>
5485         <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">
5486                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5487                         <field name="field" reporter:datatype="link"/>
5488                         <field name="id" reporter:datatype="id" />
5489                         <field name="source" reporter:datatype="link"/>
5490                         <field name="value" reporter:datatype="text"/>
5491                 </fields>
5492                 <links>
5493                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5494                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5495                 </links>
5496         </class>
5497         <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">
5498                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5499                         <field name="high" reporter:datatype="money" />
5500                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5501                         <field name="low" reporter:datatype="money" />
5502                         <field name="name" reporter:datatype="text"/>
5503                         <field name="normal" reporter:datatype="money" />
5504                         <field name="recurrence_interval" reporter:datatype="interval"/>
5505             <field name="grace_period" reporter:datatype="interval" />
5506                 </fields>
5507                 <links/>
5508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5509             <actions>
5510                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5511                 <retrieve/>
5512                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5513                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5514             </actions>
5515         </permacrud>
5516         </class>
5517         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5518                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5519                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5520                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5521                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5522                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5523                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5524                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5525                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5526                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5527                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5528                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5529                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5530                 </fields>
5531                 <links>
5532                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5533                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5534                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5535                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5536                 </links>
5537         </class>
5538         <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">
5539                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5540                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5541                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5542                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5543                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5544                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5545                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5546                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5547                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5548                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5549                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5550                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5551                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5552                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5553                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5554                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5555                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5556                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5557                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5558                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5559                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5560                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5561                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5562                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5563                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5564                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5565                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5566                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5567                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5568                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5569                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5570                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5571                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5572                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5573                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5574                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5575                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5576                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5577                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5578                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5579                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5580                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5581                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5582                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5583                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5584                 </fields>
5585                 <links>
5586                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5587                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5588                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5589                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5590                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5591                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5592                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5593                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5594                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5595                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5596                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5597                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5598                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5599                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5600                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5601                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5602                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5603                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5604                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5605                 </links>
5606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5607             <actions>
5608                 <create permission="CREATE_COPY">
5609                     <context link="call_number" field="owning_lib"/>
5610                 </create>
5611                 <retrieve/>
5612                 <update permission="UPDATE_COPY">
5613                     <context link="call_number" field="owning_lib"/>
5614                 </update>
5615                 <delete permission="DELETE_COPY">
5616                     <context link="call_number" field="owning_lib"/>
5617                 </delete>
5618             </actions>
5619         </permacrud>
5620         </class>
5621
5622         <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">
5623                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5624                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5625                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5626                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5627                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5628                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5629                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5630                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5631                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5632                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5633                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5634                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5635                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5636                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5637                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5638                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5639                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5640                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5641                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5642                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5643                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5644                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5645                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5646                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5647                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5648                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5649                 </fields>
5650                 <links>
5651                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5652                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5653                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5654                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5655                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5656                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5657                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5658                 </links>
5659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5660                         <actions>
5661                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5662                                 <retrieve />
5663                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5664                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5665                         </actions>
5666                 </permacrud>
5667         </class>
5668
5669         <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">
5670                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5671                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5672                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5673                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5674                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5675                 </fields>
5676                 <links/>
5677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5678             <actions>
5679                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5680                 <retrieve/>
5681                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5682                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5683             </actions>
5684         </permacrud>
5685         </class>
5686         <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">
5687                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5688                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5689                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5690                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5691                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5692                 </fields>
5693                 <links/>
5694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5695             <actions>
5696                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5697                 <retrieve/>
5698                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5699                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5700             </actions>
5701         </permacrud>
5702         </class>
5703         <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">
5704                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5705                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5706                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5707                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5708                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5709                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5710                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5711                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5712                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5713                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5714                 </fields>
5715                 <links>
5716                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5717                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5718                 </links>
5719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5720             <actions>
5721                 <create permission="CREATE_PERM" global_required="true"/>
5722                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5723                 <update permission="UPDATE_PERM" global_required="true"/>
5724                 <delete permission="DELETE_PERM" global_required="true"/>
5725             </actions>
5726         </permacrud>
5727         </class>
5728         <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">
5729                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5730                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5731                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5732                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5733                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5734                 </fields>
5735                 <links>
5736                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5737                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5738                 </links>
5739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5740             <actions>
5741                 <create permission="ADMIN_SURVEY">
5742                     <context link="question" jump="survey" field="owner"/>
5743                 </create>
5744                 <retrieve/>
5745                 <update permission="ADMIN_SURVEY">
5746                     <context link="question" jump="survey" field="owner"/>
5747                 </update>
5748                 <delete permission="ADMIN_SURVEY">
5749                     <context link="question" jump="survey" field="owner"/>
5750                 </delete>
5751             </actions>
5752         </permacrud>
5753         </class>
5754         <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">
5755                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5756                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5757                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5758                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5759                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5760                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5761                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5762                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5763                 </fields>
5764                 <links>
5765                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5766                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5767                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5768                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5769                 </links>
5770         </class>
5771         <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">
5772                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5773                         <field name="balance_owed" reporter:datatype="money" />
5774                         <field name="total_owed" reporter:datatype="money" />
5775                         <field name="total_paid" reporter:datatype="money" />
5776                         <field name="usr" reporter:datatype="link"/>
5777                 </fields>
5778                 <links>
5779                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5780                 </links>
5781         </class>
5782         <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">
5783                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5784                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5785                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5786                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5787                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5788                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5789                 </fields>
5790                 <links>
5791                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5792                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5793                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5794                 </links>
5795         </class>
5796         <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">
5797                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5798                         <field name="field" reporter:datatype="link"/>
5799                         <field name="id" reporter:datatype="id" />
5800                         <field name="source" reporter:datatype="link"/>
5801                         <field name="value" reporter:datatype="text"/>
5802                 </fields>
5803                 <links>
5804                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5805                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5806                 </links>
5807         </class>
5808         <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">
5809                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5810                         <field name="field" reporter:datatype="link"/>
5811                         <field name="id" reporter:datatype="id" />
5812                         <field name="source" reporter:datatype="link"/>
5813                         <field name="value" reporter:datatype="text"/>
5814                 </fields>
5815                 <links>
5816                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5817                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5818                 </links>
5819         </class>
5820         <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">
5821                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5822                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5823                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5824                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5825                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5826                 </fields>
5827                 <links>
5828                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5829                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5830                 </links>
5831         </class>
5832         <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">
5833                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5834                         <field name="depth" reporter:datatype="int" />
5835                         <field name="grantable" reporter:datatype="bool"/>
5836                         <field name="grp" reporter:datatype="link"/>
5837                         <field name="id" reporter:datatype="id" />
5838                         <field name="perm" reporter:datatype="link"/>
5839                 </fields>
5840                 <links>
5841                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5842                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5843                 </links>
5844         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5845             <actions>
5846                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5847                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5848                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5849                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5850             </actions>
5851         </permacrud>
5852         </class>
5853         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5854                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5855                         <field name="items" oils_persist:virtual="true" />
5856                         <field name="btype" reporter:datatype="text"/>
5857                         <field name="id" reporter:datatype="id" />
5858                         <field name="name" reporter:datatype="text"/>
5859                         <field name="description" reporter:datatype="text"/>
5860                         <field name="owner" reporter:datatype="link"/>
5861                         <field name="pub" reporter:datatype="bool"/>
5862                         <field name="create_time" reporter:datatype="timestamp" />
5863                 </fields>
5864                 <links>
5865                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5866                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5867                 </links>
5868         </class>
5869         <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">
5870                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5871                         <field name="id" reporter:datatype="id" />
5872                         <field name="bucket" reporter:datatype="link"/>
5873                         <field name="note" reporter:datatype="text" />
5874                 </fields>
5875                 <links>
5876                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5877                 </links>
5878         </class>
5879         <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">
5880                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5881                         <field name="id" reporter:datatype="int" />
5882                         <field name="usr" reporter:datatype="link"/>
5883                         <field name="work_ou" reporter:datatype="link"/>
5884                 </fields>
5885                 <links>
5886                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5887                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5888                 </links>
5889         </class>
5890         <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">
5891                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5892                         <field name="depth" reporter:datatype="int"/>
5893                         <field name="grantable" reporter:datatype="bool"/>
5894                         <field name="id" reporter:datatype="id" />
5895                         <field name="perm" reporter:datatype="link"/>
5896                         <field name="usr" reporter:datatype="link"/>
5897                 </fields>
5898                 <links>
5899                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5900                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5901                 </links>
5902         </class>
5903         <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">
5904                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5905                         <field name="object_id" reporter:datatype="text"/>
5906                         <field name="grantable" reporter:datatype="bool"/>
5907                         <field name="id" reporter:datatype="id" />
5908                         <field name="perm" reporter:datatype="link"/>
5909                         <field name="usr" reporter:datatype="link"/>
5910                         <field name="object_type" reporter:datatype="text"/>
5911                 </fields>
5912                 <links>
5913                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5914                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5915                 </links>
5916         </class>
5917         <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">
5918                 <fields oils_persist:primary="id" oils_persist:sequence="">
5919                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5920                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5921                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5922                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5923                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5924                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5925                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5926                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5927                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5928                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5929                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5930                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5931                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5932                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5933                 </fields>
5934                 <links>
5935                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5936                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5937                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5938                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5939                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5940                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5941                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5942                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5943                 </links>
5944         </class>
5945         <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">
5946                 <fields oils_persist:primary="id" oils_persist:sequence="">
5947                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5948                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5949                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5950                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5951                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5952                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5953                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5954                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5955                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5956                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5957                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5958                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5959                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5960                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5961                 </fields>
5962                 <links>
5963                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5964                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5965                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5966                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5967                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5968                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5969                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5970                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5971                 </links>
5972         </class>
5973         <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">
5974                 <fields oils_persist:primary="id" oils_persist:sequence="">
5975                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5976                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5977                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5978                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5979                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5980                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5981                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5982                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5983                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5984                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5985                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5986                 </fields>
5987                 <links>
5988                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5989                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5990                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5991                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5992                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5993                 </links>
5994         </class>
5995         <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">
5996                 <fields oils_persist:primary="id" oils_persist:sequence="">
5997                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5998                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5999                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6000                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6001                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6002                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6003                         <field reporter:label="Accepting User" name="accepting_usr" />
6004                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6005                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6006                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6007                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6008                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6009                 </fields>
6010                 <links>
6011                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6012                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6013                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6014                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6015                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6016                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6017                 </links>
6018         </class>
6019         <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">
6020                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6021                         <field name="bucket" reporter:datatype="link"/>
6022                         <field name="id" reporter:datatype="id" />
6023                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6024                         <field name="create_time" reporter:datatype="timestamp" />
6025                         <field name="pos" reporter:datatype="int" />
6026                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6027                 </fields>
6028                 <links>
6029                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6030                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6031             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6032                 </links>
6033         </class>
6034         <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">
6035                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6036                         <field name="id" reporter:datatype="id" />
6037                         <field name="item" reporter:datatype="link"/>
6038                         <field name="note" reporter:datatype="text" />
6039                 </fields>
6040                 <links>
6041                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6042                 </links>
6043         </class>
6044         <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">
6045                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6046                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6047                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6048                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6049                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6050                 </fields>
6051                 <links>
6052                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6053                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6054                 </links>
6055         </class>
6056     <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">
6057         <fields oils_persist:primary="field">
6058             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6059             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6060             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6061         </fields>
6062         <links/>
6063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6064             <actions>
6065                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6066                 <retrieve />
6067                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6068                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6069             </actions>
6070         </permacrud>
6071     </class>
6072         <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">
6073                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6074                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6075                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6076                 </fields>
6077                 <links/>
6078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6079             <actions>
6080                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6081                 <retrieve/>
6082                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6083                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6084             </actions>
6085         </permacrud>
6086         </class>
6087
6088
6089         <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">
6090                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6091                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6092                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6093                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6094                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6095                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6096                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6097                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6098                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6099                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6100                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6101                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6102                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6103                 </fields>
6104                 <links>
6105                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6106                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6107                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6108                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6109                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6110                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6111                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6112                 </links>
6113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6114             <actions>
6115                 <create permission="TRANSIT_COPY">
6116                     <context link="target_copy" field="owner"/>
6117                 </create>
6118                 <retrieve/>
6119                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6120                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6121             </actions>
6122         </permacrud>
6123         </class>
6124         <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">
6125                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6126                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6127                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6128                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6129                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6130                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6131                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6132                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6133                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6134                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6135                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6136                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6137                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6138                 </fields>
6139                 <links>
6140                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6141                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6142                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6143                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6144                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6145                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6146                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6147                 </links>
6148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6149             <actions>
6150                 <create permission="TRANSIT_COPY" context_field="owner">
6151                     <context link="target_copy" field="circ_lib"/>
6152                 </create>
6153                 <retrieve/>
6154                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6155                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6156             </actions>
6157         </permacrud>
6158         </class>
6159         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6160                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6161                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6162                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6163                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6164                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6165                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6166                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6167                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6168                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6169                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6170                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6171                 </fields>
6172                 <links>
6173                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6174                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6175                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6176                 </links>
6177         </class>
6178         <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">
6179                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6180                         <field name="grp" />
6181                         <field name="id" reporter:datatype="id" />
6182                         <field name="usr" />
6183                 </fields>
6184                 <links>
6185                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6186                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6187                 </links>
6188         </class>
6189         <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">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6191                         <field name="id" reporter:datatype="id" />
6192                         <field name="fq_field" reporter:datatype="text"/>
6193                         <field name="identity_value" reporter:datatype="text"/>
6194                         <field name="translation" reporter:datatype="text"/>
6195                         <field name="string" reporter:datatype="text"/>
6196                 </fields>
6197                 <links>
6198                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6199                 </links>
6200         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6201             <actions>
6202                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6203                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6204                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6205                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6206             </actions>
6207         </permacrud>
6208         </class>
6209         <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">
6210                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6211                         <field name="id" reporter:datatype="id" />
6212                         <field name="fm_class" reporter:datatype="text"/>
6213                         <field name="field" reporter:datatype="text"/>
6214                         <field name="owner" reporter:datatype="org_unit"/>
6215                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6216                 </fields>
6217                 <links>
6218                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6219                 </links>
6220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6221             <actions>
6222                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6223                 <retrieve/>
6224                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6225                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6226             </actions>
6227         </permacrud>
6228         </class>
6229         <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">
6230                 <fields oils_persist:primary="code">
6231                         <field name="code" reporter:datatype="id" />
6232                         <field name="marc_code" reporter:datatype="text"/>
6233                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6234                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6235                 </fields>
6236                 <links/>
6237         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6238             <actions>
6239                 <create permission="CREATE_LOCALE" global_required="true"/>
6240                 <retrieve/>
6241                 <update permission="UPDATE_LOCALE" global_required="true"/>
6242                 <delete permission="DELETE_LOCALE" global_required="true"/>
6243             </actions>
6244         </permacrud>
6245         </class>
6246         <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">
6247                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6248                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6249                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6250                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6251             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6252                 </fields>
6253                 <links>
6254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6255                 </links>
6256         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6257             <actions>
6258                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6259                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6260                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6261                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6262             </actions>
6263         </permacrud>
6264         </class>
6265
6266         <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">
6267                 <fields oils_persist:primary="id">
6268                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6269                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6270                 </fields>
6271                 <links/>
6272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6273             <actions>
6274                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6275                 <retrieve/>
6276                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6277                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6278             </actions>
6279         </permacrud>
6280         </class>
6281
6282         <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">
6283                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6284                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6285                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6286                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6287                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6288                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6289                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6290                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6291                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6292                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6293                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6294                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6295                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6296                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6297                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6298                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6299                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6300                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6301                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6302                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6303                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6304                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6305                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6306                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6307                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6308                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6309                 </fields>
6310                 <links>
6311                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6312                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6313                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6314                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6315                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6316                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6317                 </links>
6318         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6319             <actions>
6320                 <create permission="user_request.create">
6321                     <context link="usr" field="home_ou"/>
6322                                 </create>
6323                 <retrieve permission="user_request.view">
6324                     <context link="usr" field="home_ou"/>
6325                                 </retrieve>
6326                 <update permission="user_request.update">
6327                     <context link="usr" field="home_ou"/>
6328                                 </update>
6329                 <delete permission="user_request.delete">
6330                     <context link="usr" field="home_ou"/>
6331                                 </delete>
6332             </actions>
6333         </permacrud>
6334         </class>
6335
6336         <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">
6337                 <fields oils_persist:primary="code">
6338                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6339                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6340                 </fields>
6341                 <links/>
6342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6343             <actions>
6344                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6345                 <retrieve/>
6346                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6347                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6348             </actions>
6349         </permacrud>
6350         </class>
6351
6352         <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">
6353                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6354                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6355                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6356                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6357                         <field reporter:label="Ratio" name="ratio" />
6358                 </fields>
6359                 <links>
6360                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6361                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6362                 </links>
6363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6364                         <actions>
6365                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6366                                 <retrieve/>
6367                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6368                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6369                         </actions>
6370                 </permacrud>
6371         </class>
6372
6373         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6374                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6375                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6376                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6377                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6378                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6379                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6380                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6381                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6382                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6383                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6384                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6385                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6386                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6387                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6388                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6389                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6390                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6391                 </fields>
6392                 <links>
6393                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6394                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6395             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6396             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6397             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6398                 </links>
6399         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6400             <actions>
6401                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6402                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6403                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6404                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6405             </actions>
6406         </permacrud>
6407         </class>
6408
6409         <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">
6410                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6411                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6412                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6413                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6414                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6415                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6416                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6417                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6418                 </fields>
6419                 <links>
6420                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6421                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6422                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6423                 </links>
6424         </class>
6425
6426         <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">
6427                 <fields oils_persist:primary="code">
6428                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6429                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6430                 </fields>
6431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6432             <actions>
6433                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6434                 <retrieve/>
6435                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6436                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6437             </actions>
6438                 </permacrud>
6439         </class>
6440
6441         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6442                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6443                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6444                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6445                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6446                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6447                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6448                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6449                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6450                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6451                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6452                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6453                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6454                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6455                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6456                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6457                 </fields>
6458                 <links>
6459                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6460                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6461                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6462                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6463                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6464                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6465                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6466                 </links>
6467         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6468             <actions>
6469                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6470                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6471                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6472                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6473             </actions>
6474         </permacrud>
6475         </class>
6476
6477         <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">
6478                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6479                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6480                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6481                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6482                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6483                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6484                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6485                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6486                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6487                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6488                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6489                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6490                 </fields>
6491                 <links>
6492                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6493                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6494                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6495                 </links>
6496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6497             <actions>
6498                 <create   permission="ADMIN_INVOICE">
6499                                         <context link="invoice" field="receiver"/>
6500                                 </create>
6501                 <retrieve permission="ADMIN_INVOICE">
6502                                         <context link="invoice" field="receiver"/>
6503                                 </retrieve>
6504                 <update   permission="ADMIN_INVOICE">
6505                                         <context link="invoice" field="receiver"/>
6506                                 </update>
6507                                 <delete   permission="ADMIN_INVOICE">
6508                                         <context link="invoice" field="receiver"/>
6509                                 </delete>
6510             </actions>
6511         </permacrud>
6512         </class>
6513
6514         <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">
6515                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6516                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6517                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6518                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6519                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6520                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6521                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6522                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6523                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6524                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6525                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6526                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6527                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6528                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6529                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6530                 </fields>
6531                 <links>
6532                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6533                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6534                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6535                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6536                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6537                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6538                 </links>
6539         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6540             <actions>
6541                 <create   permission="ADMIN_INVOICE">
6542                                         <context link="invoice" field="receiver"/>
6543                                 </create>
6544                 <retrieve permission="ADMIN_INVOICE">
6545                                         <context link="invoice" field="receiver"/>
6546                                 </retrieve>
6547                 <update   permission="ADMIN_INVOICE">
6548                                         <context link="invoice" field="receiver"/>
6549                                 </update>
6550                                 <delete   permission="ADMIN_INVOICE">
6551                                         <context link="invoice" field="receiver"/>
6552                                 </delete>
6553             </actions>
6554         </permacrud>
6555         </class>
6556
6557         <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">
6558                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6559                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6560                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6561                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6562                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6563                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6564                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6565                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6566                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6567                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6568                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6569                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6570                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6571                 </fields>
6572                 <links>
6573                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6574                 </links>
6575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6576             <actions>
6577                 <create permission="ADMIN_PROVIDER">
6578                     <context link="provider" field="owner"/>
6579                 </create>
6580                 <retrieve permission="ADMIN_PROVIDER">
6581                     <context link="provider" field="owner"/>
6582                 </retrieve>
6583                 <update permission="ADMIN_PROVIDER">
6584                     <context link="provider" field="owner"/>
6585                 </update>
6586                 <delete permission="ADMIN_PROVIDER">
6587                     <context link="provider" field="owner"/>
6588                 </delete>
6589             </actions>
6590         </permacrud>
6591         </class>
6592
6593         <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">
6594                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6595                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6596                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6597                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6598                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6599                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6600                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6601         </fields>
6602                 <links>
6603                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6604                 </links>
6605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6606             <actions>
6607                 <create permission="ADMIN_PROVIDER">
6608                     <context link="provider" field="owner"/>
6609                 </create>
6610                 <retrieve permission="ADMIN_PROVIDER">
6611                     <context link="provider" field="owner"/>
6612                 </retrieve>
6613                 <update permission="ADMIN_PROVIDER">
6614                     <context link="provider" field="owner"/>
6615                 </update>
6616                 <delete permission="ADMIN_PROVIDER">
6617                     <context link="provider" field="owner"/>
6618                 </delete>
6619             </actions>
6620         </permacrud>
6621     </class>
6622         <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">
6623                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6624                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6625                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6626                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6627                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6628                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6629                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6630                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6631                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6632                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6633                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6634                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6635                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6636                 </fields>
6637                 <links>
6638                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6639                 </links>
6640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6641             <actions>
6642                 <create permission="ADMIN_PROVIDER">
6643                     <context link="contact" jump='provider' field="owner"/>
6644                 </create>
6645                 <retrieve permission="ADMIN_PROVIDER">
6646                     <context link="contact" jump='provider' field="owner"/>
6647                 </retrieve>
6648                 <update permission="ADMIN_PROVIDER">
6649                     <context link="contact" jump='provider' field="owner"/>
6650                 </update>
6651                 <delete permission="ADMIN_PROVIDER">
6652                     <context link="contact" jump='provider' field="owner"/>
6653                 </delete>
6654             </actions>
6655         </permacrud>
6656         </class>
6657
6658         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6659                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6660                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6661                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6662                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6663                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6664                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6665                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6666                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6667                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6668                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6669                 </fields>
6670                 <links>
6671                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6672                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6673                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6674                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6675                 </links>
6676         </class>
6677
6678         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6679                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6680                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6681                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6682                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6683                 </fields>
6684                 <links>
6685             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6686                 </links>
6687                 <!--
6688                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6689                         But here's what it should look like if we ever do use pcrud.
6690                 -->
6691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6692                         <actions>
6693                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6694                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6695                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6696                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6697                         </actions>
6698                 </permacrud>
6699         </class>
6700
6701         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6702                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6703                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6704                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6705                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6706                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6707                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6708                 </fields>
6709                 <links>
6710                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6711                 </links>
6712                 <!--
6713                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6714                         But here's what it should look like if we ever do use pcrud.
6715                 -->
6716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6717                         <actions>
6718                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6719                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6720                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6721                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6722                         </actions>
6723                 </permacrud>
6724         </class>
6725
6726         <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">
6727                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6728                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6729                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6730                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6731                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6732                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6733                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6734                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6735                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6736                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6737                 </fields>
6738                 <links>
6739                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6740                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6741             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6742             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6743                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6744                 </links>
6745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6746             <actions>
6747                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6748                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6749                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6750                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6751             </actions>
6752         </permacrud>
6753         </class>
6754
6755         <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">
6756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6757                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6758                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6759                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6760                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6761                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6762                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6763                 </fields>
6764                 <links>
6765                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6766                 </links>
6767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6768                         <actions>
6769                                 <create permission="ADMIN_FUNDING_SOURCE">
6770                     <context link="funding_source" field="owner"/>
6771                 </create>
6772                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6773                     <context link="funding_source" field="owner"/>
6774                 </retrieve>
6775                                 <update permission="ADMIN_FUNDING_SOURCE">
6776                     <context link="funding_source" field="owner"/>
6777                 </update>
6778                                 <delete permission="ADMIN_FUNDING_SOURCE">
6779                     <context link="funding_source" field="owner"/>
6780                 </delete>
6781                         </actions>
6782                 </permacrud>
6783         </class>
6784
6785         <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">
6786                 <fields oils_persist:primary="id">
6787                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6788                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6789                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6790                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6791                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6792                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6793                 </fields>
6794                 <links>
6795                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6796                 </links>
6797         </class>
6798
6799         <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">
6800                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6801                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6802                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6803                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6804                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6805                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6806                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6807                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6808                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6809                 </fields>
6810                 <links>
6811                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6812                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6813                 </links>
6814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6815                         <actions>
6816                                 <create permission="ADMIN_ACQ_FUND">
6817                     <context link="fund" field="org"/>
6818                 </create>
6819                                 <retrieve permission="ADMIN_ACQ_FUND">
6820                     <context link="fund" field="org"/>
6821                 </retrieve>
6822                                 <update permission="ADMIN_ACQ_FUND">
6823                     <context link="fund" field="org"/>
6824                 </update>
6825                                 <delete permission="ADMIN_ACQ_FUND">
6826                     <context link="fund" field="org"/>
6827                 </delete>
6828                         </actions>
6829                 </permacrud>
6830         </class>
6831
6832         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6834                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6835                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6836                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6837                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6838                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6839                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6840                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6841                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6842                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6843                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6844                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6845                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6846                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6847                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6848                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6849                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
6850                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
6851                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
6852                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
6853                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
6854                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
6855                 </fields>
6856                 <links>
6857                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6858                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6859             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6860             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6861             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6862             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
6863             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
6864             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
6865             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
6866             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
6867             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
6868                 </links>
6869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6870             <actions>
6871                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6872                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6873                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6874                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6875             </actions>
6876         </permacrud>
6877         </class>
6878
6879         <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">
6880                 <fields oils_persist:primary="fund">
6881                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6882                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6883                 </fields>
6884                 <links>
6885                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6886                 </links>
6887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6888             <actions>
6889                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6890                                         <context link="fund" field="org" />
6891                 </retrieve>
6892             </actions>
6893         </permacrud>
6894         </class>
6895
6896         <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">
6897                 <fields oils_persist:primary="fund">
6898                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6899                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6900                 </fields>
6901                 <links>
6902                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6903                 </links>
6904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6905             <actions>
6906                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6907                                         <context link="fund" field="org" />
6908                 </retrieve>
6909             </actions>
6910         </permacrud>
6911         </class>
6912
6913         <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">
6914                 <fields oils_persist:primary="fund">
6915                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6916                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6917                 </fields>
6918                 <links>
6919                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6920                 </links>
6921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6922             <actions>
6923                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6924                                         <context link="fund" field="org" />
6925                 </retrieve>
6926             </actions>
6927         </permacrud>
6928         </class>
6929
6930         <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">
6931                 <fields oils_persist:primary="fund">
6932                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6933                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6934                 </fields>
6935                 <links>
6936                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6937                 </links>
6938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6939             <actions>
6940                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6941                                         <context link="fund" field="org" />
6942                 </retrieve>
6943             </actions>
6944         </permacrud>
6945         </class>
6946
6947         <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">
6948                 <fields oils_persist:primary="fund">
6949                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6950                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6951                 </fields>
6952                 <links>
6953                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6954                 </links>
6955         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6956             <actions>
6957                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6958                                         <context link="fund" field="org" />
6959                 </retrieve>
6960             </actions>
6961         </permacrud>
6962         </class>
6963
6964    <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">
6965         <fields oils_persist:primary="fund">
6966             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6967             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6968         </fields>
6969         <links>
6970             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6971         </links>
6972     </class>
6973
6974    <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">
6975         <fields oils_persist:primary="fund">
6976             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6977             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6978         </fields>
6979         <links>
6980             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6981         </links>
6982     </class>
6983
6984    <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">
6985         <fields oils_persist:primary="fund">
6986             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6987             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6988         </fields>
6989         <links>
6990             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6991         </links>
6992     </class>
6993
6994    <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">
6995         <fields oils_persist:primary="fund">
6996             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6997             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6998         </fields>
6999         <links>
7000             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7001         </links>
7002     </class>
7003
7004    <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">
7005         <fields oils_persist:primary="fund">
7006             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7007             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7008         </fields>
7009         <links>
7010             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7011         </links>
7012     </class>
7013
7014         <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">
7015                 <fields oils_persist:primary="funding_source">
7016                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7017                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7018                 </fields>
7019                 <links>
7020                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7021                 </links>
7022         </class>
7023
7024         <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">
7025                 <fields oils_persist:primary="funding_source">
7026                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7027                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7028                 </fields>
7029                 <links>
7030                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7031                 </links>
7032         </class>
7033
7034         <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">
7035                 <fields oils_persist:primary="funding_source">
7036                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7037                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7038                 </fields>
7039                 <links>
7040                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7041                 </links>
7042         </class>
7043
7044         <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">
7045                 <fields oils_persist:primary="fund">
7046                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7047                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7048                 </fields>
7049                 <links>
7050                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7051                 </links>
7052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7053             <actions>
7054                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7055                                         <context link="fund" field="org" />
7056                 </retrieve>
7057             </actions>
7058         </permacrud>
7059     </class>
7060
7061         <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">
7062                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7063                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7064                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7065                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7066                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7067                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7068                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7069                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7070                 </fields>
7071                 <links>
7072                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7073                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7074                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7075                 </links>
7076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7077                         <actions>
7078                                 <create permission="ADMIN_ACQ_FUND">
7079                     <context link="fund" field="org"/>
7080                 </create>
7081                                 <retrieve permission="ADMIN_ACQ_FUND">
7082                     <context link="fund" field="org"/>
7083                 </retrieve>
7084                                 <update permission="ADMIN_ACQ_FUND">
7085                     <context link="fund" field="org"/>
7086                 </update>
7087                                 <delete permission="ADMIN_ACQ_FUND">
7088                     <context link="fund" field="org"/>
7089                 </delete>
7090                         </actions>
7091                 </permacrud>
7092         </class>
7093
7094     <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">
7095         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7096             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7097             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7098             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7099             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7100             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7101             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7102             <field reporter:label="Note" name="note" reporter:datatype="text" />
7103             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7104         </fields>
7105         <links>
7106             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7107             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7108             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7109         </links>
7110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7111                         <actions>
7112                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7113                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7114                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7115                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7116                         </actions>
7117                 </permacrud>
7118     </class>
7119
7120         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7121                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7122                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7123                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7124                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7125                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7126                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7127                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7128                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7129                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7130                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7131                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7132                 </fields>
7133                 <links>
7134                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7135                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7136                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7137                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7138                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7139                 </links>
7140                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7141                         <actions>
7142                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7143                         </actions>
7144                 </permacrud>
7145         </class>
7146
7147         <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">
7148                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7149                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7150                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7151                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7152                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7153                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7154                 </fields>
7155                 <links>
7156                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7157                 </links>
7158                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7159                         <actions>
7160                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7161                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7162                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7163                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7164                         </actions>
7165                 </permacrud>
7166         </class>
7167
7168         <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">
7169                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7170                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7171                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7172                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7173                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7174                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7175                         <field reporter:label="State" name="state" reporter:datatype="text" />
7176                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7177                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7178                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7179                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7180                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7181                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7182                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7183                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7184                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7185                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7186                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7187                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7188                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7189                 </fields>
7190                 <links>
7191                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7192                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7193                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7194                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7195                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7196                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7197                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7198                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7199                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7200                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7201                 </links>
7202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7203                         <actions>
7204                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7205                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7206                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7207                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7208                         </actions>
7209                 </permacrud>
7210         </class>
7211
7212         <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">
7213                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7214                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7215                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7216                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7217                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7218                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7219                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7220                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7221                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7222                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7223                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7224                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7225                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7226                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7227                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7228                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7229                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7230                 </fields>
7231                 <links>
7232                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7233                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7234                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7235                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7236                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7237                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7238                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7239                 </links>
7240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7241             <actions>
7242                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7243             </actions>
7244                 </permacrud>
7245         </class>
7246
7247         <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">
7248                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7249                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7250                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7251                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7252                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7253                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7254                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7255                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7256                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7257                 </fields>
7258                 <links>
7259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7260                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7261                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7262                 </links>
7263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7264             <actions>
7265                 <create permission="CREATE_PURCHASE_ORDER">
7266                     <context link="purchase_order" field="ordering_agency"/>
7267                 </create>
7268                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7269                     <context link="purchase_order" field="ordering_agency"/>
7270                 </retrieve>
7271                 <update permission="CREATE_PURCHASE_ORDER">
7272                     <context link="purchase_order" field="ordering_agency"/>
7273                 </update>
7274                 <delete permission="CREATE_PURCHASE_ORDER">
7275                     <context link="purchase_order" field="ordering_agency"/>
7276                 </delete>
7277             </actions>
7278                 </permacrud>
7279         </class>
7280
7281         <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">
7282                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7283                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7284                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7285                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7286                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7287                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7288                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7289                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7290                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7291                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7292                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7293                 </fields>
7294                 <links>
7295                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7296                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7297                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7298                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7299                 </links>
7300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7301             <actions>
7302                 <create permission="CREATE_PURCHASE_ORDER">
7303                     <context link="purchase_order" field="ordering_agency"/>
7304                 </create>
7305                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7306                     <context link="purchase_order" field="ordering_agency"/>
7307                 </retrieve>
7308                 <update permission="CREATE_PURCHASE_ORDER">
7309                     <context link="purchase_order" field="ordering_agency"/>
7310                 </update>
7311                 <delete permission="CREATE_PURCHASE_ORDER">
7312                     <context link="purchase_order" field="ordering_agency"/>
7313                 </delete>
7314             </actions>
7315                 </permacrud>
7316         </class>
7317
7318         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7319                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7320                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7321                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7322                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7323                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7324                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7325                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7326                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7327                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7328                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7329                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7330                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7331                         <field reporter:label="State" name="state" reporter:datatype="text" />
7332                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7333                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7334                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7335                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7336                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7337                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7338                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7339                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7340                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7341                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7342                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7343                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7344                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7345                 </fields>
7346                 <links>
7347                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7348                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7349                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7350                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7351                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7352                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7353                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7354                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7355                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7356                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7357                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7358                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7359                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7360                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7361                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7362                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7363                 </links>
7364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7365                         <actions>
7366                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7367                                         <context link="purchase_order" field="ordering_agency"/>
7368                                         <context link="picklist" field="org_unit"/>
7369                                 </retrieve>
7370                         </actions>
7371                 </permacrud>
7372         </class>
7373
7374         <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">
7375                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7376                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7377                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7378                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7379                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7380                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7381                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7382                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7383                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7384                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7385                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7386                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7387                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7388                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7389                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7390                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7391                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7392                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7393                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7394                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7395                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7396                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7397                 </fields>
7398                 <links>
7399                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7400                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7401                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7402                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7403                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7404                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7405                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7406                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7407                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7408                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7409                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7410                 </links>
7411                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7412                         <actions>
7413                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7414                                         <context link="purchase_order" field="ordering_agency"/>
7415                                         <context link="picklist" field="org_unit"/>
7416                                 </retrieve>
7417                         </actions>
7418                 </permacrud>
7419         </class>
7420
7421         <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">
7422                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7423                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7424                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7425                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7426                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7427                 </fields>
7428                 <links>
7429                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7430                 </links>
7431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7432                         <actions>
7433                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7434                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7435                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7436                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7437                         </actions>
7438                 </permacrud>
7439         </class>
7440
7441         <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">
7442                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7443                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7444                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7445                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7446                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7447                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7448                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7449                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7450                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7451                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7452                 </fields>
7453                 <links>
7454                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7455                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7456                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7457                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7458                 </links>
7459         </class>
7460
7461         <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">
7462                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7463                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7464                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7465                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7466                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7467                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7468                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7469                 </fields>
7470                 <links>
7471                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7472                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7473                 </links>
7474         </class>
7475
7476         <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">
7477                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7478                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7479                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7480                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7481                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7482                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7483                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7484                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7485                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7486                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7487                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7488                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7489                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7490                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7491                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7492                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7493                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7494                 </fields>
7495                 <links>
7496                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7497                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7498                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7499                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7500                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7501                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7502                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7503                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7504                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7505                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7506                 </links>
7507         </class>
7508
7509         <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">
7510                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7511                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7512                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7513                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7514                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7515                 </fields>
7516                 <links/>
7517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7518                         <actions>
7519                                 <retrieve />
7520                         </actions>
7521                 </permacrud>
7522         </class>
7523
7524         <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">
7525                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7526                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7527                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7528                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7529                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7530                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7531             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7532                 </fields>
7533                 <links/>
7534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7535             <actions>
7536                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7537                 <retrieve />
7538                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7539                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7540             </actions>
7541         </permacrud>
7542         </class>
7543
7544         <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">
7545                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7546                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7547                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7548                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7549                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7550                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7551                 </fields>
7552                 <links/>
7553         </class>
7554         <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">
7555                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7556                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7557                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7558                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7559                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7560                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7561                 </fields>
7562                 <links>
7563                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7564                 </links>
7565         </class>
7566
7567         <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">
7568             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7569                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7570                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7571                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7572                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7573                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7574                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7575         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7576
7577             </fields>
7578             <links>
7579                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7580             </links>
7581             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7582                 <actions>
7583                     <create permission="ADMIN_PROVIDER">
7584                         <context link="provider" field="owner"/>
7585                     </create>
7586                     <retrieve permission="ADMIN_PROVIDER">
7587                         <context link="provider" field="owner"/>
7588                     </retrieve>
7589                     <update permission="ADMIN_PROVIDER">
7590                         <context link="provider" field="owner"/>
7591                     </update>
7592                     <delete permission="ADMIN_PROVIDER">
7593                         <context link="provider" field="owner"/>
7594                     </delete>
7595                 </actions>
7596             </permacrud>
7597         </class>
7598         
7599         <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">
7600             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7601                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7602                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7603                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7604                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7605             </fields>
7606             <links>
7607                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7608             </links>
7609             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7610                 <actions>
7611                     <create permission="ADMIN_PROVIDER">
7612                         <context link="provider" field="owner"/>
7613                     </create>
7614                     <retrieve permission="ADMIN_PROVIDER">
7615                         <context link="provider" field="owner"/>
7616                     </retrieve>
7617                     <update permission="ADMIN_PROVIDER">
7618                         <context link="provider" field="owner"/>
7619                     </update>
7620                     <delete permission="ADMIN_PROVIDER">
7621                         <context link="provider" field="owner"/>
7622                     </delete>
7623                 </actions>
7624             </permacrud>
7625         </class>
7626         
7627         <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">
7628             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7629                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7630                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7631                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7632                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7633                 </fields>
7634                 <links/>
7635         </class>
7636
7637         <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">
7638                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7639                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7640                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7641                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7642                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7643                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7644                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7645                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7646                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7647                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7648                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7649                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7650                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7651                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7652                 </fields>
7653                 <links>
7654                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7655                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7656                 </links>
7657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7658             <actions>
7659                 <create permission="ADMIN_PROVIDER">
7660                     <context link="provider" field="owner"/>
7661                 </create>
7662                 <retrieve permission="ADMIN_PROVIDER">
7663                     <context link="provider" field="owner"/>
7664                 </retrieve>
7665                 <update permission="ADMIN_PROVIDER">
7666                     <context link="provider" field="owner"/>
7667                 </update>
7668                 <delete permission="ADMIN_PROVIDER">
7669                     <context link="provider" field="owner"/>
7670                 </delete>
7671             </actions>
7672         </permacrud>
7673         </class>
7674
7675         <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">
7676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7677                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7678                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7679                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7680                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7681                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7682                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7683                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7684                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7685                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7686                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7687                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7688                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7689                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7690                 </fields>
7691                 <links>
7692                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7693                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7694                 </links>
7695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7696             <actions>
7697                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7698                     <context link="account" jump="provider" field="owner"/>
7699                 </retrieve>
7700                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7701                     <context link="account" jump="provider" field="owner"/>
7702                 </update>
7703                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7704                     <context link="account" jump="provider" field="owner"/>
7705                 </delete>
7706             </actions>
7707         </permacrud>
7708         </class>
7709
7710
7711         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7712                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7713                         <field name="id" reporter:datatype="id" />
7714                         <field name="parent" reporter:datatype="link"/>
7715                         <field name="owner" reporter:datatype="link"/>
7716                         <field name="create_time" reporter:datatype="timestamp"/>
7717                         <field name="name" reporter:datatype="text"/>
7718                         <field name="shared" reporter:datatype="bool"/>
7719                         <field name="share_with" reporter:datatype="link"/>
7720                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7721                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7722                 </fields>
7723                 <links>
7724                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7725                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7726                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7727                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7728                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7729                 </links>
7730         </class>
7731         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7732                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7733                         <field name="id" reporter:datatype="id" />
7734                         <field name="parent" reporter:datatype="link"/>
7735                         <field name="owner" reporter:datatype="link"/>
7736                         <field name="create_time" reporter:datatype="timestamp"/>
7737                         <field name="name" reporter:datatype="text"/>
7738                         <field name="shared" reporter:datatype="bool"/>
7739                         <field name="share_with" reporter:datatype="link"/>
7740                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7741                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7742                 </fields>
7743                 <links>
7744                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7745                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7746                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7747                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7748                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7749                 </links>
7750         </class>
7751         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7752                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7753                         <field name="id" reporter:datatype="id" />
7754                         <field name="parent" reporter:datatype="link"/>
7755                         <field name="owner" reporter:datatype="link"/>
7756                         <field name="create_time" reporter:datatype="timestamp"/>
7757                         <field name="name" reporter:datatype="text"/>
7758                         <field name="shared" reporter:datatype="bool"/>
7759                         <field name="share_with" reporter:datatype="link"/>
7760                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7761                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7762                 </fields>
7763                 <links>
7764                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7765                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7766                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7767                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7768                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7769                 </links>
7770         </class>
7771         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7772                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7773                         <field name="id" reporter:datatype="id" />
7774                         <field name="owner" reporter:datatype="link"/>
7775                         <field name="create_time" reporter:datatype="timestamp"/>
7776                         <field name="name" reporter:datatype="text"/>
7777                         <field name="data" reporter:datatype="text"/>
7778                         <field name="folder" reporter:datatype="link"/>
7779                         <field name="description" reporter:datatype="text"/>
7780                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7781                 </fields>
7782                 <links>
7783                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7784                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7785                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7786                 </links>
7787         </class>
7788         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7789                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7790                         <field name="id" reporter:datatype="id" />
7791                         <field name="owner" reporter:datatype="link"/>
7792                         <field name="create_time" reporter:datatype="timestamp"/>
7793                         <field name="template" reporter:datatype="link"/>
7794                         <field name="data" reporter:datatype="text"/>
7795                         <field name="folder" reporter:datatype="link"/>
7796                         <field name="recur" reporter:datatype="bool"/>
7797                         <field name="recurrence" reporter:datatype="interval"/>
7798                         <field name="name" reporter:datatype="text"/>
7799                         <field name="description" reporter:datatype="text"/>
7800                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7801                 </fields>
7802                 <links>
7803                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7804                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7805                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7806                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7807                 </links>
7808         </class>
7809         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7810                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7811                         <field name="id" reporter:datatype="id" />
7812                         <field name="runner" reporter:datatype="link"/>
7813                         <field name="start_time" reporter:datatype="timestamp"/>
7814                         <field name="complete_time" reporter:datatype="timestamp"/>
7815                         <field name="run_time" reporter:datatype="timestamp"/>
7816                         <field name="email" reporter:datatype="text"/>
7817                         <field name="excel_format" reporter:datatype="bool"/>
7818                         <field name="csv_format" reporter:datatype="bool"/>
7819                         <field name="html_format" reporter:datatype="bool"/>
7820                         <field name="error_code" reporter:datatype="int"/>
7821                         <field name="error_text" reporter:datatype="text"/>
7822                         <field name="report" reporter:datatype="link"/>
7823                         <field name="folder" reporter:datatype="link"/>
7824                         <field name="chart_pie" reporter:datatype="bool"/>
7825                         <field name="chart_bar" reporter:datatype="bool"/>
7826                         <field name="chart_line" reporter:datatype="bool"/>
7827                 </fields>
7828                 <links>
7829                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7830                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7831                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7832                 </links>
7833         </class>
7834         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
7835                 <fields oils_persist:primary="id">
7836                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7837                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7838                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7839                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7840                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7841                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7842                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7843                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7844                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7845                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7846                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7847                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7848                 </fields>
7849                 <links>
7850                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7851                 </links>
7852         </class>
7853         <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">
7854                 <fields oils_persist:primary="id">
7855                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7856                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7857                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7858                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7859                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7860                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7861                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7862                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7863                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7864                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7865                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7866                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7867                 </fields>
7868                 <links>
7869                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7870                 </links>
7871         </class>
7872         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7873                 <fields oils_persist:primary="id">
7874                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7875                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7876                         <field reporter:label="Fingerprint" name="fingerprint" />
7877                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7878                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7879                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7880                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7881                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7882                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7883                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7884                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7885                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7886                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7887                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7888                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7889                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7890                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7891                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7892                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7893                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7894                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7895                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7896                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7897                 </fields>
7898                 <links>
7899                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7900                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7901                 </links>
7902         </class>
7903         <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">
7904                 <fields oils_persist:primary="id">
7905                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7906                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7907                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7908                 </fields>
7909                 <links>
7910                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7911                 </links>
7912         </class>
7913         <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">
7914                 <fields oils_persist:primary="id">
7915                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7916                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7917                 </fields>
7918                 <links>
7919                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7920                 </links>
7921         </class>
7922         <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">
7923                 <fields oils_persist:primary="id">
7924                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7925                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7926                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7927                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7928                 </fields>
7929                 <links>
7930                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7931                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7932                 </links>
7933         </class>
7934         <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">
7935                 <fields oils_persist:primary="xact">
7936                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7937                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7938                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7939                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7940                 </fields>
7941                 <links>
7942                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7943                 </links>
7944         </class>
7945         <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">
7946                 <fields oils_persist:primary="xact">
7947                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7948                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7949                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7950                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7951                 </fields>
7952                 <links>
7953                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7954                 </links>
7955         </class>
7956         <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)">
7957                 <fields oils_persist:primary="id">
7958                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7959                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7960                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7961                 </fields>
7962                 <links>
7963                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7964                 </links>
7965         </class>
7966         <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">
7967                 <fields oils_persist:primary="id">
7968                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7969                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7970                 </fields>
7971                 <links>
7972                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7973                 </links>
7974         </class>
7975         <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">
7976                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7977                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7978                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7979                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7980                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7981                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7982                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7983                 </fields>
7984                 <links>
7985                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7986                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7987                 </links>
7988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7989                         <actions>
7990                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7991                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7992                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7993                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7994                         </actions>
7995                 </permacrud>
7996         </class>
7997         <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">
7998                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7999                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8000                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8001                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8002                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8003                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8004                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8005                 </fields>
8006                 <links>
8007                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8008                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8009                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8010                 </links>
8011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8012                         <actions>
8013                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8014                                         <context link="formula" field="owner"/>
8015                                 </create>
8016                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8017                                         <context link="formula" field="owner"/>
8018                                 </retrieve>
8019                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8020                                         <context link="formula" field="owner"/>
8021                                 </update>
8022                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8023                                         <context link="formula" field="owner"/>
8024                                 </delete>
8025                         </actions>
8026                 </permacrud>
8027         </class>
8028
8029         <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">
8030                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8031                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8032                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8033                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8034                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8035                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8036                 </fields>
8037                 <links>
8038                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8039                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8040                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8041                 </links>
8042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8043                         <actions>
8044                                 <create permission="CREATE_PURCHASE_ORDER">
8045                                         <context link="formula" field="owner"/>
8046                 </create>
8047                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8048                                         <context link="formula" field="owner"/>
8049                 </retrieve>
8050                                 <update permission="CREATE_PURCHASE_ORDER">
8051                                         <context link="formula" field="owner"/>
8052                 </update>
8053                                 <delete permission="CREATE_PURCHASE_ORDER">
8054                                         <context link="formula" field="owner"/>
8055                 </delete>
8056                         </actions>
8057                 </permacrud>
8058         </class>
8059
8060         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8061                 <fields oils_persist:primary="id">
8062                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8063                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8064                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8065                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8066                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8067                 </fields>
8068                 <links>
8069                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8070                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8071                 </links>
8072         </class>
8073
8074         <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">
8075                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8076                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8077                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8078                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8079                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8080                 </fields>
8081                 <links>
8082                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8083                 </links>
8084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8085                         <actions>
8086                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8087                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8088                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8089                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8090                         </actions>
8091                 </permacrud>
8092         </class>
8093
8094         <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">
8095                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8096                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8097                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8098                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8099                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8100                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8101                 </fields>
8102                 <links>
8103                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8104                 </links>
8105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8106                         <actions>
8107                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8108                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8109                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8110                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8111                         </actions>
8112                 </permacrud>
8113         </class>
8114
8115         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8116                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8117                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8118                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8119                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8120                 </fields>
8121                 <links>
8122                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8123                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8124                 </links>
8125         </class>
8126
8127         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8128                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8129                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8130                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8131                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8132                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8133                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8134                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8135                 </fields>
8136                 <links>
8137                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8138                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8139                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8140                 </links>
8141         </class>
8142
8143         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8144                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8145                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8146                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8147                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8148                 </fields>
8149                 <links>
8150                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8151                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8152                 </links>
8153         </class>
8154
8155         <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">
8156                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8157                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8158                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8159                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8160                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8161                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8162                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8163                 </fields>
8164                 <links>
8165                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8166                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8167                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8168                 </links>
8169         </class>
8170
8171         <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">
8172                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8173                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8174                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8175                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8176                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8177                 </fields>
8178                 <links>
8179                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8180                 </links>
8181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8182             <actions>
8183                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8184                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8185                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8186                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8187             </actions>
8188                 </permacrud>
8189         </class>
8190
8191         <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">
8192                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8193                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8194                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8195                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8196                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8197                 </fields>
8198                 <links>
8199                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8200                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8201                 </links>
8202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8203                         <actions>
8204                                 <create permission="ADMIN_CLAIM_POLICY">
8205                                         <context link="claim_policy" field="org_unit"/>
8206                 </create>
8207                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8208                                         <context link="claim_policy" field="org_unit"/>
8209                 </retrieve>
8210                                 <update permission="ADMIN_CLAIM_POLICY">
8211                                         <context link="claim_policy" field="org_unit"/>
8212                 </update>
8213                                 <delete permission="ADMIN_CLAIM_POLICY">
8214                                         <context link="claim_policy" field="org_unit"/>
8215                 </delete>
8216                         </actions>
8217                 </permacrud>
8218         </class>
8219
8220     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8221         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8222             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8223             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8224             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8225             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8226             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8227             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8228             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8229             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8230             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8231             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8232             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8233             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8234             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8235             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8236             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8237         </fields>
8238     </class>
8239
8240     <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">
8241         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8242             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8243             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8244             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8245             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8246             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8247         </fields>
8248     </class>
8249
8250     <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">
8251         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8252             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8253             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8254             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8255             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8256             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8257             <field reporter:label="City" name="city" reporter:datatype="text"/>
8258             <field reporter:label="State" name="state" reporter:datatype="text"/>
8259             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8260             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8261             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8262         </fields>
8263     </class>
8264
8265     <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">
8266         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8267             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8268             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8269             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8270             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8271             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8272             <field reporter:label="City" name="city" reporter:datatype="text"/>
8273             <field reporter:label="State" name="state" reporter:datatype="text"/>
8274             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8275             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8276             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8277         </fields>
8278     </class>
8279
8280     <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">
8281         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8282             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8283             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8284             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8285             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8286             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8287             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8288         </fields>
8289     </class>
8290
8291         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8292                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8293                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8294                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8295                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8296                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8297                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8298                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8299                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8300                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8301                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8302                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8303                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8304                 </fields>
8305                 <links>
8306                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8307                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8308                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8309                 </links>
8310         </class>
8311
8312         <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">
8313                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8314                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8315                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8316                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8317                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8318                 </fields>
8319                 <links>
8320                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8321                 </links>
8322         </class>
8323
8324     <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">
8325         <fields>
8326             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8327             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8328             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8329         </fields>
8330                 <links>
8331                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8332                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8333                 </links>
8334     </class>
8335
8336     <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">
8337         <fields>
8338             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8339             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8340         </fields>
8341                 <links>
8342                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8343                 </links>
8344     </class>
8345
8346     <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">
8347         <fields>
8348             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8349             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8350             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8351         </fields>
8352                 <links>
8353                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8354                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8355                 </links>
8356     </class>
8357
8358     <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">
8359         <fields>
8360             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8361             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8362         </fields>
8363                 <links>
8364                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8365                 </links>
8366     </class>
8367
8368     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8369                 <oils_persist:source_definition>
8370
8371             SELECT  DISTINCT l.*
8372               FROM  action.unfulfilled_hold_loops l
8373                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8374               WHERE l.count = m.max
8375
8376                 </oils_persist:source_definition>
8377         <fields>
8378             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8379             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8380             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8381         </fields>
8382                 <links>
8383                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8384                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8385                 </links>
8386     </class>
8387
8388         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8389                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8390                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8391                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8392                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8393                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8394                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8395                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8396                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8397                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8398                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8399                 </fields>
8400                 <links>
8401                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8402                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8403                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8404                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8405                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8406                 </links>
8407         </class>
8408
8409         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8410                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8411                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8412                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8413                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8414                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8415                 </fields>
8416                 <links>
8417                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8418                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8419                 </links>
8420         </class>
8421
8422         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8423                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8424                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8425                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8426                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8427                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8428                 </fields>
8429                 <links>
8430                 </links>
8431         </class>
8432
8433         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8434                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8435                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8436                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8437                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8438                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8439                 </fields>
8440                 <links>
8441                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8442                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8443                 </links>
8444         </class>
8445         
8446         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8447                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8448                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8449                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8450                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8451                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8452                 </fields>
8453                 <links>
8454                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8455                 </links>
8456         </class>
8457         
8458         <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">
8459                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8460                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8461                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8462                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8463                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8464                 </fields>
8465                 <links>
8466                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8467                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8468                 </links>
8469         </class>
8470
8471         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8472                 <fields oils_persist:primary="name">
8473                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8474                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8475                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8476                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8477                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8478                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8479                 </fields>
8480                 <links>
8481                 </links>
8482         </class>
8483
8484         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8485                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8486                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8487                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8488                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8489                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8490                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8491                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8492                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8493                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8494                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8495                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8496                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8497                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8498                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8499                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8500                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8501                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8502                 </fields>
8503                 <links>
8504                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8505                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8506                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8507                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8508                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8509                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8510                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8511                 </links>
8512         </class>
8513
8514         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8515                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8516                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8517                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8518                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8519                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8520                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8521                 </fields>
8522                 <links>
8523                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8524                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8525                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8526                 </links>
8527         </class>
8528
8529         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8530                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8531                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8532                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8533                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8534                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8535                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8536                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8537                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8538                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8539                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8540                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8541                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8542                 </fields>
8543                 <links>
8544                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8545                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8546                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8547                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8548                 </links>
8549         </class>
8550
8551         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8552                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8553                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8554                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8555                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8556                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8557                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8558                 </fields>
8559                 <links>
8560                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8561                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8562                 </links>
8563         </class>
8564
8565         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8566                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8567                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8568                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8569                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8570                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8571                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8572                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8573                 </fields>
8574                 <links>
8575                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8576                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8577                 </links>
8578         </class>
8579
8580         <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">
8581                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8582                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8583                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8584                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8585                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8586                 </fields>
8587                 <links>
8588                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8589                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8590                 </links>
8591         </class>
8592
8593         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8594                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8595                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8596                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8597                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8598                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8599                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8600                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8601                 </fields>
8602                 <links>
8603                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8604                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8605                 </links>
8606         </class>
8607
8608         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8609                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8610                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8611                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8612                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8613                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8614                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8615                 </fields>
8616                 <links>
8617                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8618                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8619                 </links>
8620         </class>
8621
8622         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8623                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8624                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8625                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8626                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8627                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8628                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8629                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8630                 </fields>
8631                 <links>
8632                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8633                 </links>
8634         </class>
8635
8636         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8637                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8638                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8639                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8640                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8641                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8642                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8643                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8644                 </fields>
8645                 <links>
8646                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8647                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8648                 </links>
8649         </class>
8650
8651         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8652                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8653                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8654                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8655                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8656                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8657                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8658                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8659                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8660                 </fields>
8661                 <links>
8662                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8663                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8664                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8665                 </links>
8666         </class>
8667
8668         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8669                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8670                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8671                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8672                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8673                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8674                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8675                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8676                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8677                 </fields>
8678                 <links>
8679                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8680                 </links>
8681         </class>
8682
8683         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8684                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8685                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8686                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8687                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8688                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8689                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8690                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8691                 </fields>
8692                 <links>
8693                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8694                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8695                 </links>
8696         </class>
8697
8698         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8699                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8700                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8701                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8702                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8703                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8704                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8705                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8706                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8707                 </fields>
8708                 <links>
8709                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8710                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8711                 </links>
8712         </class>
8713
8714         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8715                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8716                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8717                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8718                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8719                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8720                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8721                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8722                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8723                 </fields>
8724                 <links>
8725                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8726                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8727                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8728                 </links>
8729         </class>
8730
8731         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8732                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8733                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8734                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8735                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8736                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8737                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8738                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8739                 </fields>
8740                 <links>
8741                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8742                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8743                 </links>
8744         </class>
8745
8746         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8747                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8748                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8749                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8750                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8751                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8752                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8753                 </fields>
8754                 <links>
8755                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8756                 </links>
8757         </class>
8758
8759         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8760                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8761                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8762                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8763                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8764                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8765                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8766                 </fields>
8767                 <links>
8768                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8769                 </links>
8770         </class>
8771
8772         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8773                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8774                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8775                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8776                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8777                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8778                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8779                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8780                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8781                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8782                 </fields>
8783                 <links>
8784                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8785                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8786                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8787                 </links>
8788         </class>
8789
8790         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8791                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8792                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8793                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8794                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8795                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8796                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8797                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8798                 </fields>
8799                 <links>
8800                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8801                 </links>
8802         </class>
8803
8804         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8805                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8806                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8807                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8808                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8809                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8810                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8811                 </fields>
8812                 <links>
8813                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8814                 </links>
8815         </class>
8816
8817         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8818                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8819                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8820                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8821                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8822                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8823                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8824                 </fields>
8825                 <links>
8826                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8827                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8828                 </links>
8829         </class>
8830
8831         <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">
8832                 <fields oils_persist:primary="id">
8833                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8834                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8835                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8836                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8837                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8838                 </fields>
8839                 <links>
8840                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8841                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8842                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8843                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8844                 </links>
8845         </class>
8846
8847         <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">
8848                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8849                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8850                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8851                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8852                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8853                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8854                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8855                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8856                 </fields>
8857                 <links/>
8858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8859                         <actions>
8860                                 <retrieve/>
8861                         </actions>
8862                 </permacrud>
8863         </class>
8864
8865         <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">
8866                 <fields oils_persist:primary="ptype_key">
8867                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8868                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8869                 </fields>
8870                 <links/>
8871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8872                         <actions>
8873                                 <retrieve/>
8874                         </actions>
8875                 </permacrud>
8876         </class>
8877
8878         <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">
8879                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8880                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8881                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8882                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8883                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8884                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8885                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8886                 </fields>
8887                 <links>
8888                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8889                 </links>
8890                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8891                         <actions>
8892                                 <retrieve/>
8893                         </actions>
8894                 </permacrud>
8895         </class>
8896
8897         <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">
8898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8899                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8900                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8901                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8902                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8903                 </fields>
8904                 <links>
8905                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8906                 </links>
8907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8908                         <actions>
8909                                 <retrieve/>
8910                         </actions>
8911                 </permacrud>
8912         </class>
8913
8914         <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">
8915                 <fields oils_persist:primary="code">
8916                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8917                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8918                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8919                 </fields>
8920                 <links/>
8921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8922                         <actions>
8923                                 <retrieve/>
8924                         </actions>
8925                 </permacrud>
8926         </class>
8927
8928         <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">
8929                 <oils_persist:source_definition>
8930
8931             SELECT  b.id,
8932                     MAX(dcp.edit_date) AS last_delete_date
8933              FROM   biblio.record_entry b
8934                     JOIN asset.call_number cn ON (cn.record = b.id)
8935                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8936              WHERE  NOT b.deleted
8937              GROUP BY b.id
8938              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8939
8940                 </oils_persist:source_definition>
8941                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8942                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8943                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8944                 </fields>
8945                 <links>
8946                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8947                 </links>
8948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8949                         <actions>
8950                                 <retrieve/>
8951                         </actions>
8952                 </permacrud>
8953         </class>
8954
8955         <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">
8956                 <oils_persist:source_definition>
8957
8958             -- -- 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.
8959             -- -- 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
8960             -- -- may not.
8961             -- SELECT
8962             --     bre.id AS "bib_id",
8963             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8964             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8965             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8966             -- FROM (
8967                 SELECT
8968                     y.bre AS "id",
8969                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8970                     y.hold_count AS "hold_count",
8971                     (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"
8972                 FROM (
8973                         SELECT
8974                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8975                             COUNT(*) AS "hold_count"
8976                         FROM action.hold_request h
8977                         WHERE
8978                             cancel_time IS NULL
8979                             AND fulfillment_time IS NULL
8980                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8981                         GROUP BY 1
8982                     )y LEFT JOIN (
8983                         SELECT 
8984                             (SELECT id
8985                                 FROM biblio.record_entry 
8986                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8987                             ) AS "bre", 
8988                             COUNT(*) AS "copy_count"
8989                         FROM asset.copy
8990                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8991                         WHERE copy.holdable 
8992                             AND NOT copy.deleted 
8993                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8994                         GROUP BY 1
8995                     )x ON x.bre = y.bre
8996                 -- )z RIGHT JOIN (
8997                 --     SELECT id
8998                 --     FROM biblio.record_entry
8999                 --     WHERE NOT deleted
9000                 -- )bre ON (z.bib_id = bre.id)
9001                 
9002
9003                 </oils_persist:source_definition>
9004                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9005                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9006                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9007                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9008                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9009                 </fields>
9010                 <links>
9011                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9012                 </links>
9013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9014                         <actions>
9015                                 <retrieve/>
9016                         </actions>
9017                 </permacrud>
9018         </class>
9019
9020         <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">
9021                 <oils_persist:source_definition>
9022             SELECT *,
9023                 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,
9024                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9025             FROM
9026                 (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
9027                     FROM
9028                         action.hold_request ahr
9029                         JOIN reporter.hold_request_record rhrr USING (id)
9030                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9031                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9032                     WHERE
9033                         ahr.cancel_time IS NULL
9034                         AND ahr.fulfillment_time IS NULL
9035                     GROUP BY bib_record, pickup_lib
9036                 )x
9037                 JOIN
9038                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9039                     FROM
9040                         action.hold_request ahr
9041                         JOIN reporter.hold_request_record rhrr USING (id)
9042                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9043                     WHERE
9044                         ahr.cancel_time IS NULL
9045                         AND ahr.fulfillment_time IS NULL
9046                     GROUP BY bib_record
9047                 )y
9048                 USING (id)
9049                 </oils_persist:source_definition>
9050                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9051                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9052                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9053                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9054                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9055                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9056                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9057                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9058                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9059                 </fields>
9060                 <links>
9061                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9062                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9063                 </links>
9064                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9065                         <actions>
9066                                 <retrieve/>
9067                         </actions>
9068                 </permacrud>
9069         </class>
9070
9071         <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">
9072                 <oils_persist:source_definition>
9073             SELECT
9074                 ac.id,
9075                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9076                 MAX(actac.xact_start) AS last_circ
9077             FROM asset.copy ac
9078                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9079             GROUP BY ac.id
9080
9081             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9082             --SELECT
9083             --    ac.id,
9084             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9085             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9086             --FROM asset.copy ac
9087             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9088             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9089             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9090                 </oils_persist:source_definition>
9091                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9092                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9093                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9094                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9095                 </fields>
9096                 <links>
9097                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9098                 </links>
9099                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9100                         <actions>
9101                                 <retrieve/>
9102                         </actions>
9103                 </permacrud>
9104         </class>
9105
9106         <!-- ********************************************************************************************************************* -->
9107         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9108         <!-- ********************************************************************************************************************* -->
9109         <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">
9110                 <fields oils_persist:primary="id">
9111                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9112                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9113                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9114                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9115                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9116                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9117                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9118                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9119                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9120                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9121                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9122                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9123                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9124                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9125                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9126                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9127                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9128                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9129                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9130                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9131                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9132                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9133                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9134                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9135                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9136                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9137                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9138                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9139                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9140                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9141                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9142                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9143                 </fields>
9144                 <links>
9145                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9146                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9147                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9148                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9149                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9150                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9151                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9152                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9153                 </links>
9154         </class>
9155
9156         <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">
9157                 <fields oils_persist:primary="id">
9158                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9159                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9160                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9161                 </fields>
9162                 <links>
9163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9164                 </links>
9165         </class>
9166
9167         <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">
9168                 <fields oils_persist:primary="id">
9169                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9170                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9171                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9172                 </fields>
9173                 <links>
9174                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9175                 </links>
9176         </class>
9177
9178         <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">
9179                 <fields oils_persist:primary="id">
9180                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9181
9182                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9183                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9184                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9185
9186                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9187                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9188                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9189
9190                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9191                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9192
9193                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9194                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9195                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9196
9197                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9198                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9199
9200                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9201                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9202                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9203
9204                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9205                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9206                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9207
9208                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9209                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9210                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9211                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9212
9213                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9214                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9215
9216                 </fields>
9217                 <links>
9218                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9219                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9220                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9221                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9222                 </links>
9223         </class>
9224
9225         <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">
9226                 <oils_persist:source_definition>
9227
9228             SELECT
9229                 po.ordering_agency AS ordering_agency,
9230                 po.id AS purchase_order,
9231                 li.id AS lineitem,
9232                 lid.id AS lineitem_detail,
9233                 cpa.id AS claim_policy_action
9234             FROM
9235                 acq.lineitem_detail lid
9236                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9237                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9238                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9239                 JOIN acq.claim_policy_action cpa ON (
9240                     cpa.claim_policy = cp.id
9241
9242                     -- we only care about claim policy actions whose claim
9243                     -- interval we'd reached or exceeded
9244                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9245
9246                     -- filter out all claim policy actions where claim events
9247                     -- have occurred on or after the action's action_interval
9248                     AND NOT EXISTS (
9249                         SELECT 1
9250                         FROM
9251                             acq.claim_event evt
9252                             JOIN acq.claim claim ON (
9253                                 claim.id = evt.claim
9254                                 AND claim.lineitem_detail = lid.id
9255                             )
9256                         WHERE
9257                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9258                     )
9259                 )
9260             WHERE
9261                 lid.cancel_reason IS NULL
9262                 AND li.cancel_reason IS NULL -- belt/suspenders
9263                 AND po.cancel_reason IS NULL -- belt/suspenders
9264                 AND lid.recv_time IS NULL
9265                 AND po.state = 'on-order'
9266             ORDER BY 1, 2, 3, 4, 5
9267
9268                 </oils_persist:source_definition>
9269                 <fields>
9270                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9271                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9272                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9273                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9274                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9275                 </fields>
9276                 <links>
9277                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9278                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9279                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9280                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9281                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9282                 </links>
9283         </class>
9284
9285         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9286                 <oils_persist:source_definition>
9287
9288             SELECT 
9289                 li.id AS lineitem, 
9290                 (
9291                     SELECT COUNT(lid.id) 
9292                     FROM acq.lineitem_detail lid
9293                     WHERE lineitem = li.id
9294                 ) AS item_count,
9295                 (
9296                     SELECT COUNT(lid.id) 
9297                     FROM acq.lineitem_detail lid
9298                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9299                 ) AS recv_count,
9300                 (
9301                     SELECT COUNT(lid.id) 
9302                     FROM acq.lineitem_detail lid
9303                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9304                 ) AS cancel_count,
9305                 (
9306                     SELECT COUNT(lid.id) 
9307                     FROM acq.lineitem_detail lid
9308                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9309                     WHERE NOT debit.encumbrance AND lineitem = li.id
9310                 ) AS invoice_count,
9311                 (
9312                     SELECT COUNT(DISTINCT(lid.id)) 
9313                     FROM acq.lineitem_detail lid
9314                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9315                     WHERE lineitem = li.id
9316                 ) AS claim_count,
9317                 (
9318                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9319                     FROM acq.lineitem_detail lid
9320                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9321                 ) AS estimated_amount,
9322                 (
9323                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9324                     FROM acq.lineitem_detail lid
9325                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9326                     WHERE debit.encumbrance AND lineitem = li.id
9327                 ) AS encumbrance_amount,
9328                 (
9329                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9330                     FROM acq.lineitem_detail lid
9331                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9332                     WHERE NOT debit.encumbrance AND lineitem = li.id
9333                 ) AS paid_amount
9334
9335                 FROM acq.lineitem AS li
9336         </oils_persist:source_definition>
9337                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9338                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9339                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9340                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9341                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9342                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9343                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9344                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9345                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9346                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9347                 </fields>
9348                 <links>
9349                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9350                 </links>
9351     </class>
9352
9353
9354         <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">
9355                 <oils_persist:source_definition>
9356
9357                         SELECT  t.*
9358                           FROM  action.transit_copy t
9359                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9360                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9361                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9362
9363                 </oils_persist:source_definition>
9364                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9365                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9366                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9367                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9368                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9369                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9370                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9371                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9372                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9373                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9374                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9375                 </fields>
9376                 <links>
9377                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9378                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9379                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9380                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9381                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9382                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9383                 </links>
9384         </class>
9385
9386     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9387                 <oils_persist:source_definition>
9388
9389         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9390                 SELECT
9391                         cp.id as copy,
9392                         COUNT(circ.id),
9393                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9394                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9395                 FROM
9396                         asset.copy cp
9397                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9398                 GROUP BY 1, 3, 4
9399                 UNION
9400                 SELECT
9401                         cp.id as copy,
9402                         COUNT(circ.id),
9403                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9404                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9405                 FROM
9406                         asset.copy cp
9407                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9408                 GROUP BY 1, 3, 4
9409                 UNION
9410                 SELECT
9411                         id as copy,
9412                         circ_count,
9413                         -1 AS year,
9414                         false as is_renewal
9415                 FROM
9416                         extend_reporter.legacy_circ_count
9417         )x GROUP BY 1, 3, 4
9418
9419                 </oils_persist:source_definition>
9420         <fields>
9421             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9422             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9423             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9424             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9425         </fields>
9426                 <links>
9427                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9428                 </links>
9429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9430                         <actions>
9431                                 <retrieve/>
9432                         </actions>
9433                 </permacrud>
9434     </class>
9435
9436         <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">
9437                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9438                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9439                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9440                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9441                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9442                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9443                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9444                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9445                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9446                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9447                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9448                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9449                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9450                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9451                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9452                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9453                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9454                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9455                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9456                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9457                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9458                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9459                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9460                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9461                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9462                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9463                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9464                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9465                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9466                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9467                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9468                 </fields>
9469                 <links>
9470                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9471                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9472                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9473                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9474                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9475                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9476                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9477                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9478                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9479                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9480                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9481                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9482                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9483                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9484                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9485                 </links>
9486         </class>
9487
9488     <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">
9489         <fields oils_persist:primary="id">
9490             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9491             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9492             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9493             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9494             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9495             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9496             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9497             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9498             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9499             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9500             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9501             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9502             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9503             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9504             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9505             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9506             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9507             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9508             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9509             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9510             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9511             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9512             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9513             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9514             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9515             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9516             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9517             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9518             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9519             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9520             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9521             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9522             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9523             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9524         </fields>
9525         <links>
9526             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9527             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9528             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9529             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9530             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9531         </links>
9532     </class>
9533
9534     <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">
9535         <fields oils_persist:primary="id">
9536             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9537             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9538             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9539             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9540         </fields>
9541         <links>
9542             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9543             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9544         </links>
9545     </class>
9546
9547     <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">
9548         <fields oils_persist:primary="owning_lib">
9549             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9550             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9551             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9552         </fields>
9553         <links>
9554             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9555         </links>
9556     </class>
9557
9558     <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">
9559         <fields oils_persist:primary="id">
9560             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9561             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9562             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9563             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9564             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9565         </fields>
9566         <links>
9567             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9568             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9569             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9570         </links>
9571     </class>
9572
9573     <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">
9574         <fields oils_persist:primary="circ_lib">
9575             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9576             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9577             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9578             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9579         </fields>
9580         <links>
9581             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9582             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9583         </links>
9584     </class>
9585
9586     <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">
9587         <fields oils_persist:primary="id">
9588             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9589             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9590             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9591             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9592             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9593         </fields>
9594         <links>
9595             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9596             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9597             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9598         </links>
9599     </class>
9600
9601     <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">
9602         <fields oils_persist:primary="home_ou">
9603             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9604             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9605             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9606             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9607         </fields>
9608         <links>
9609             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9610             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9611         </links>
9612     </class>
9613         <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">
9614                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9615                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9616                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9617                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9618                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9619                 </fields>
9620                 <links>
9621                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9622                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9623                 </links>
9624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9625                         <actions>
9626                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9627                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9628                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9629                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9630                         </actions>
9631                 </permacrud>
9632         </class>
9633         <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">
9634                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9635                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9636                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9637                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9638                 </fields>
9639                 <links>
9640                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9641                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9642                         </links>
9643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9644                 <actions>
9645                                 <create permission="ADMIN_ACQ_FUND_TAG">
9646                                         <context link="tag" field="owner"/>
9647                                 </create>
9648                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9649                                         <context link="tag" field="owner"/>
9650                                 </retrieve>
9651                                 <update permission="ADMIN_ACQ_FUND_TAG">
9652                                         <context link="tag" field="owner"/>
9653                                 </update>
9654                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9655                                         <context link="tag" field="owner"/>
9656                                 </delete>
9657                         </actions>
9658                 </permacrud>
9659         </class>
9660         <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">
9661                 <oils_persist:source_definition><![CDATA[
9662                 SELECT
9663                         poi.purchase_order AS purchase_order,
9664                         ii.invoice AS invoice,
9665                         NULL AS lineitem,
9666                         poi.id AS po_item,
9667                         NULL AS picklist
9668                 FROM
9669                         acq.po_item poi
9670                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
9671                 UNION SELECT
9672                         jub.purchase_order AS purchase_order,
9673                         ie.invoice AS invoice,
9674                         jub.id AS lineitem,
9675                         NULL AS po_item,
9676                         jub.picklist AS picklist
9677                 FROM
9678                         acq.lineitem jub
9679                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
9680                 UNION SELECT
9681                         ii.purchase_order AS purchase_order,
9682                         ii.invoice AS invoice,
9683                         NULL AS lineitem,
9684                         NULL AS po_item,
9685                         NULL AS picklist
9686                 FROM
9687                         acq.invoice_item ii
9688                 WHERE ii.po_item IS NULL
9689                 UNION SELECT
9690                         ie.purchase_order AS purchase_order,
9691                         ie.invoice AS invoice,
9692                         NULL AS lineitem,
9693                         NULL AS po_item,
9694                         NULL AS picklist
9695                 FROM
9696                         acq.invoice_entry ie
9697                 WHERE ie.lineitem IS NULL
9698                 UNION SELECT
9699                         NULL AS purchase_order,
9700                         NULL AS invoice,
9701                         jub.id AS lineitem,
9702                         NULL AS po_item,
9703                         jub.picklist AS picklist
9704                 FROM
9705                         acq.lineitem jub
9706                 WHERE jub.purchase_order IS NULL
9707                 ]]></oils_persist:source_definition>
9708                 <fields>
9709                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
9710                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
9711                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
9712                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
9713                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
9714                 </fields>
9715                 <links>
9716                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
9717                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
9718                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
9719                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
9720                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
9721                 </links>
9722         </class>
9723         <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">
9724                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9725                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9726                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9727                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9728                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9729                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9730                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9731                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9732                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9733                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9734                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9735                 </fields>
9736                 <links>
9737                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9738                 </links>
9739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9740                         <actions>
9741                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9742                                 <retrieve/>
9743                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9744                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9745                         </actions>
9746                 </permacrud>
9747         </class>
9748
9749         <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">
9750                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9751                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9752                         <field name="date_applied" reporter:datatype="timestamp"/>
9753                         <field name="org" reporter:datatype="org_unit"/>
9754                         <field name="original_value" reporter:datatype="text"/>
9755                         <field name="new_value" reporter:datatype="text"/>
9756                         <field name="field_name" reporter:datatype="link"/>
9757                 </fields>
9758                 <links>
9759                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9760                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9761                 </links>
9762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9763                         <actions>
9764                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9765                                 <retrieve/>
9766                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9767                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9768                         </actions>
9769                 </permacrud>
9770         </class>
9771         <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">
9772                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9773                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9774                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9775                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9776                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9777                 </fields>
9778                 <links>
9779                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9780                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
9781                 </links>
9782         </class>
9783         <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">
9784                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9785                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9786                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9787                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9788                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9789                 </fields>
9790                 <links>
9791                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9792                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
9793                 </links>
9794         </class>
9795
9796
9797         <!-- ********************************************************************************************************************* -->
9798
9799 </IDL>
9800
9801 <!--
9802     vim:noet:ts=4:sw=4:
9803 -->