]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Add Copy Location to circ matrix matchpoint
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
152                 </fields>
153                 <links>
154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
155                 </links>
156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
157                         <actions>
158                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
159                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
160                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
161                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
162                         </actions>
163                 </permacrud>
164         </class>
165
166         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
167                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
168                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
169                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
170                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
171                 </fields>
172                 <links>
173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
174                 </links>
175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
176                         <actions>
177                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
181                         </actions>
182                 </permacrud>
183         </class>
184
185         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
186                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
187                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
188                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
189                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
190                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
191                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
192                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
193                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
194                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
195                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
196                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
197                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
198                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
199                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
200                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
201                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
202                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
203                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
204                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
205                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
206                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
207                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
208                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
209                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
210                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
211                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
212                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
213                 </fields>
214                 <links>
215                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
216                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
217                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
218                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
219                 </links>
220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
221                         <actions>
222                                 <create permission="CREATE_IMPORT_ITEM">
223                     <context link="definition" field="owner"/>
224                                 </create>
225                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
226                     <context link="definition" field="owner"/>
227                                 </retrieve>
228                                 <update permission="UPDATE_IMPORT_ITEM">
229                     <context link="definition" field="owner"/>
230                                 </update>
231                                 <delete permission="DELETE_IMPORT_ITEM">
232                     <context link="definition" field="owner"/>
233                                 </delete>
234                         </actions>
235                 </permacrud>
236         </class>
237
238         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
239                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
240                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
241                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
242                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
243                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
244                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
245                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
246                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
247                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
263                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
264                 </fields>
265                 <links>
266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
267                 </links>
268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
269                         <actions>
270                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
271                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
272                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
273                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
274                         </actions>
275                 </permacrud>
276         </class>
277
278         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
279                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
280                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
281                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
282                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
283                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
284                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
285                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
286                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
287                 </fields>
288                 <links>
289                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
290                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
291                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
292                 </links>
293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
294                         <actions>
295                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
296                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
297                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
298                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
299                         </actions>
300                 </permacrud>
301         </class>
302
303         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
304                 <fields oils_persist:primary="code">
305                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
306                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
307                 </fields>
308                 <links>
309                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
310                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
311                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <retrieve/>
316                         </actions>
317                 </permacrud>
318         </class>
319
320         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
321                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
322                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
323                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
324                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
325                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
326                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
327                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
328                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
329                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
330                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
331                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
332                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
333                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
334                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
335                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
336                 </fields>
337                 <links>
338                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
339                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
340                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
341                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
342             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
343             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
344             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
345                 </links>
346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
347                         <actions>
348                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
352                         </actions>
353                 </permacrud>
354         </class>
355
356         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
358                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
360                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
361                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
362                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
363                 </fields>
364                 <links/>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
368                 <retrieve/>
369                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
370                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
371                         </actions>
372                 </permacrud>
373         </class>
374
375         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
376                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
377                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
378                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
379                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
380                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
381                 </fields>
382                 <links>
383                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
384                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
385                 </links>
386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
387                         <actions>
388                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
389                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
390                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
391                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
392                         </actions>
393                 </permacrud>
394         </class>
395
396         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
397                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
398                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
399                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
400                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
401                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
402                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
403                 </fields>
404                 <links>
405                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
406                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
407                 </links>
408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
409                         <actions>
410                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
411                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
412                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
413                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
414                         </actions>
415                 </permacrud>
416         </class>
417
418         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
419                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
420                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
421                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
422                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
423                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
424                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
425                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
426                 </fields>
427                 <links>
428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
429                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
430                 </links>
431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
432                         <actions>
433                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
434                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
435                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
436                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
437                         </actions>
438                 </permacrud>
439         </class>
440
441         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
442                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
443                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
444                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
445                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
446                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
447                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
448                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
449                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
450                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
451                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
452                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
453                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
454                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
455                 </fields>
456                 <links>
457                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
458                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
459                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
460             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
461             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
462                 </links>
463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
464                         <actions>
465                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
466                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                         </actions>
470                 </permacrud>
471         </class>
472
473         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
474                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
476                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
477                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
478                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
479                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
480                 </fields>
481                 <links/>
482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
483                         <actions>
484                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
485                 <retrieve/>
486                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
487                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
488                         </actions>
489                 </permacrud>
490         </class>
491
492         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
493                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
494                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
496                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
497                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
498                 </fields>
499                 <links>
500                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
501                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
502                 </links>
503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
504                         <actions>
505                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
506                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
507                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
508                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
509                         </actions>
510                 </permacrud>
511         </class>
512
513         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
514                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
515                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
516                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
517                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
522                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
523                 </links>
524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525                         <actions>
526                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
530                         </actions>
531                 </permacrud>
532         </class>
533
534         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
535                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
536                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
537                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
538                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
539                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
540                 </fields>
541                 <links>
542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
543                 </links>
544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
545                         <actions>
546                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
547                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
548                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
549                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
550                         </actions>
551                 </permacrud>
552         </class>
553
554         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
555                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
556                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
557                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
558                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
559                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
560                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
561                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
562                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
563             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
564                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
565                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
566                 </fields>
567                 <links>
568                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
569                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
570                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
571                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
572                 </links>
573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
574                         <actions>
575                                 <create permission="ADMIN_IMPORT_MATCH_SET">
576                     <context link="match_set" field="owner"/>
577                                 </create>
578                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
579                     <context link="match_set" field="owner"/>
580                                 </retrieve>
581                                 <update permission="ADMIN_IMPORT_MATCH_SET">
582                     <context link="match_set" field="owner"/>
583                                 </update>
584                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
585                     <context link="match_set" field="owner"/>
586                                 </delete>
587                         </actions>
588                 </permacrud>
589         </class>
590
591         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
592                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
593                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
594                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
595                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
596                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
597                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
598                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
599                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
600                 </fields>
601                 <links>
602                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
603                 </links>
604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
605                         <actions>
606                                 <create permission="ADMIN_IMPORT_MATCH_SET">
607                     <context link="match_set" field="owner"/>
608                                 </create>
609                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
610                     <context link="match_set" field="owner"/>
611                                 </retrieve>
612                                 <update permission="ADMIN_IMPORT_MATCH_SET">
613                     <context link="match_set" field="owner"/>
614                                 </update>
615                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
616                     <context link="match_set" field="owner"/>
617                                 </delete>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
623                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
624                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
625                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
626                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
627                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
628                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
629                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
630                 </fields>
631                 <links>
632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
634                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
635                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
636                 </links>
637         </class>
638
639     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
640         <fields oils_persist:primary="name">
641             <field reporter:label="Name" name="name" reporter:datatype="text"/>
642             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
643             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
644             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
645         </fields>
646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647             <actions>
648                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
649                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
650                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
651                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
652             </actions>
653         </permacrud>
654     </class>
655
656     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
657         <fields oils_persist:primary="id">
658             <field reporter:label="ID" name="id" reporter:datatype="id"/>
659             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
660             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
661             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
662             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
663         </fields>
664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665             <actions>
666                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
667                 <retrieve/>
668                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
669                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
670             </actions>
671         </permacrud>
672     </class>
673
674         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
675                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
676                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
678                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
679                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
680                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
681                 </fields>
682                 <links>
683                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
684                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
685                 </links>
686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687             <actions>
688                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
689                 <retrieve/>
690                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
691                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
692             </actions>
693         </permacrud>
694         </class>
695
696         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
697                 <fields oils_persist:primary="name">
698                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
699                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
700                         <field reporter:label="Description" name="description" reporter:datatype="text" />
701                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
702                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
703                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
704                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
705                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
706                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
707                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
708                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
709                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
710                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
711                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
712                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
713                 </fields>
714                 <links>
715                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
716                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
717                 </links>
718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
719             <actions>
720                 <create permission="ADMIN_SVF" global_required="true"/>
721                 <retrieve/>
722                 <update permission="ADMIN_SVF" global_required="true"/>
723                 <delete permission="ADMIN_SVF" global_required="true"/>
724             </actions>
725         </permacrud>
726         </class>
727
728         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
729                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
731                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
732                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
733             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
734                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
735                 </fields>
736                 <links/>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
740                 <retrieve/>
741                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
742                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
743             </actions>
744         </permacrud>
745         </class>
746
747         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
748                 <fields oils_persist:primary="id">
749                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
750                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
751                 </fields>
752                 <links>
753                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
754                 </links>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <retrieve/>
758             </actions>
759         </permacrud>
760         </class>
761
762         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
765                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
766                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
767                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
768                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
769                 </fields>
770                 <links>
771                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
772                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
773                 </links>
774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
775             <actions>
776                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <retrieve/>
778                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780             </actions>
781         </permacrud>
782         </class>
783
784         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
785                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
786                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
787                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
788                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
789                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
790                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
791                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
792                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
793             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
794                 </fields>
795                 <links>
796                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
797                 </links>
798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
799             <actions>
800                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
801                 <retrieve/>
802                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
803                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
804             </actions>
805         </permacrud>
806         </class>
807
808         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
809                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
810                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
811                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
812                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
813                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
814                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
815                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
816                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
817                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
818                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
819                 </fields>
820                 <links>
821                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
822                 </links>
823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824             <actions>
825                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
826                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
827                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
828                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
829             </actions>
830         </permacrud>
831         </class>
832
833     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
834         <fields oils_persist:primary="name">
835             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
836             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
837             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
838             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
839             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
840             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
841             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
842             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
843             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
844             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
845         </fields>
846         <links>
847             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
848             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
849         </links>
850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
851             <actions>
852                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
853                 <retrieve/>
854                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
855                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
856             </actions>
857         </permacrud>
858     </class>
859
860     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
861         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
862             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
863             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
864             <field reporter:label="Name" name="name" reporter:datatype="text"/>
865             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
866             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
867             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
868             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
869         </fields>
870         <links>
871             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
872         </links>
873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
874             <actions>
875                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
876                 <retrieve/>
877                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
878                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
879             </actions>
880         </permacrud>
881     </class>
882
883         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
884                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
885                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
886                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
887                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
888                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
889                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
890                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
891                 </fields>
892                 <links>
893             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
894             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
895                 </links>
896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897                         <actions>
898                                 <retrieve/>
899                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
900                         </actions>
901                 </permacrud>
902         </class>
903
904         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
905                 <fields oils_persist:primary="key">
906                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
907                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
908                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
909                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
910                 </fields>
911                 <links/>
912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
913                         <actions>
914                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
915                                 <retrieve/>
916                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
917                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
918                         </actions>
919                 </permacrud>
920         </class>
921
922         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
923                 <fields oils_persist:primary="module">
924                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
925                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
926                 </fields>
927                 <links/>
928         </class>
929
930         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
931                 <fields oils_persist:primary="module">
932                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
933                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
934                 </fields>
935                 <links/>
936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937                         <actions>
938                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
939                                 <retrieve/>
940                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
941                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
942                         </actions>
943                 </permacrud>
944         </class>
945
946         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
947                 <fields oils_persist:primary="module">
948                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
949                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
950                 </fields>
951                 <links/>
952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
953                         <actions>
954                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
955                                 <retrieve/>
956                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
957                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
958                         </actions>
959                 </permacrud>
960         </class>
961
962         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
963                 <fields oils_persist:primary="module">
964                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
965                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
966                 </fields>
967                 <links/>
968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
969                         <actions>
970                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
971                                 <retrieve/>
972                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
973                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
974                         </actions>
975                 </permacrud>
976         </class>
977
978         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
979                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
980                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
981                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
982                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
983                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
984                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
985                 </fields>
986                 <links>
987                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
988                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
989                 </links>
990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
991                         <actions>
992                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
993                     <context link="event_def" field="owner"/>
994                 </create>
995                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
996                     <context link="event_def" field="owner"/>
997                 </retrieve>
998                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
999                     <context link="event_def" field="owner"/>
1000                 </update>
1001                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1002                     <context link="event_def" field="owner"/>
1003                 </delete>
1004                         </actions>
1005                 </permacrud>
1006         </class>
1007
1008         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1009                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1010                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1011                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1012                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1013                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1014                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1015                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1016                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1017                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1018                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1019                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1020                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1021                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1022                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1023                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1024                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1025                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1026                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1027                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1028                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1029                 </fields>
1030                 <links>
1031                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1032                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1033                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1034                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1035                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1036                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1037                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1038                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1039                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1040                 </links>
1041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1042                         <actions>
1043                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1044                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1045                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1046                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1047                         </actions>
1048                 </permacrud>
1049         </class>
1050
1051         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1052                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1053                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1054                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1055                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1056                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1057                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1058                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1059                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1060                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1061                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1062                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1063                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1064                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1065                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1066                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1067                 </fields>
1068                 <links>
1069                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1070                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1071                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1072                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1073                 </links>
1074         </class>
1075
1076         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1077                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1078                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1079                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1080                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1081                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1082                 </fields>
1083                 <links>
1084                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1085                 </links>
1086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1087                         <actions>
1088                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1089                     <context link="event_def" field="owner"/>
1090                 </create>
1091                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1092                     <context link="event_def" field="owner"/>
1093                 </retrieve>
1094                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1095                     <context link="event_def" field="owner"/>
1096                 </update>
1097                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1098                     <context link="event_def" field="owner"/>
1099                 </delete>
1100                         </actions>
1101                 </permacrud>
1102         </class>
1103
1104         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1105                 <oils_persist:source_definition><![CDATA[
1106                 SELECT  atevdef.hook,
1107                         atevdef.name,
1108                         atevdef.reactor,
1109                         atev.id,
1110                         atev.event_def,
1111                         atev.add_time,
1112                         atev.run_time,
1113                         atev.start_time,
1114                         atev.update_time,
1115                         atev.complete_time,
1116                         atev.update_process,
1117                         atev.state,
1118                         atev.user_data,
1119                         atev.template_output,
1120                         atev.error_output,
1121                         atev.async_output,
1122                         targ_circ.id AS target_circ,
1123                         targ_ahr.id AS target_hold,
1124                         COALESCE(
1125                                 targ_circ.circ_lib,
1126                                 targ_ahr.pickup_lib
1127                         ) AS perm_lib
1128                 FROM action_trigger.event atev
1129                 JOIN action_trigger.event_definition atevdef ON
1130                         (atevdef.id = atev.event_def)
1131                 JOIN action_trigger.hook ath ON
1132                         (ath.key = atevdef.hook)
1133                 LEFT JOIN action.circulation targ_circ ON
1134                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1135                 LEFT JOIN action.hold_request targ_ahr ON
1136                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1137                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1138                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1139                                 'circ.staff.max_visible_event_age',
1140                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1141                         ) UNION
1142                         SELECT '1000 YEARS'::INTERVAL AS value
1143                 ) ous)
1144                 ]]></oils_persist:source_definition>
1145                 <fields oils_persist:primary="id">
1146                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1147                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1148                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1149                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1150                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1151                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1152                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1153                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1154                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1155                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1156                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1157                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1158                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1159                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1160                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1161                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1162                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1163                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1164                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1165                 </fields>
1166                 <links>
1167                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1168                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1169                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1170                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1171                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1172                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1173                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1174                 </links>
1175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1176                         <actions>
1177                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1178                         </actions>
1179                 </permacrud>
1180         </class>
1181
1182         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1183                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1184                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1185                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1186                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1187                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1188                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1189                 </fields>
1190                 <links>
1191                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1192                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1193                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1194                 </links>
1195         </class>
1196
1197         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1198                 <fields oils_persist:primary="code">
1199                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1200                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1201                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1202                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1203                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1204                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1205                 </fields>
1206                 <links/>
1207         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1208             <actions>
1209                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1210                 <retrieve/>
1211                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1212                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1213             </actions>
1214         </permacrud>
1215         </class>
1216
1217         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1218                 <fields oils_persist:primary="code">
1219                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1220                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1221                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1222                 </fields>
1223                 <links/>
1224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1225             <actions>
1226                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1227                 <retrieve/>
1228                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1229                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1230             </actions>
1231         </permacrud>
1232         </class>
1233
1234         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1235                 <fields oils_persist:primary="code">
1236                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1237                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1238                 </fields>
1239                 <links/>
1240         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1241             <actions>
1242                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1243                 <retrieve/>
1244                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1245                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1246             </actions>
1247         </permacrud>
1248         </class>
1249
1250         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1251                 <fields oils_persist:primary="code">
1252                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1253                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1254                 </fields>
1255                 <links/>
1256         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1257             <actions>
1258                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1259                 <retrieve/>
1260                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1261                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1262             </actions>
1263         </permacrud>
1264         </class>
1265
1266         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1267                 <fields oils_persist:primary="code">
1268                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1269                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1270                 </fields>
1271                 <links/>
1272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1273             <actions>
1274                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1275                 <retrieve/>
1276                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1277                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1278             </actions>
1279         </permacrud>
1280         </class>
1281
1282         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1283                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1284                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1285                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1286                 </fields>
1287                 <links/>
1288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1289             <actions>
1290                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1291                 <retrieve/>
1292                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1293                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1294             </actions>
1295         </permacrud>
1296         </class>
1297
1298         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1299                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1300                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1301                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1302                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1303                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1304                 </fields>
1305         <links>
1306             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1307             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1308             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1309         </links>
1310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1311             <actions>
1312                 <create permission="UPDATE_COPY">
1313                     <context link="target_copy" field="circ_lib"/>
1314                 </create>
1315                 <retrieve/>
1316                 <update permission="UPDATE_COPY">
1317                     <context link="target_copy" field="circ_lib"/>
1318                 </update>
1319                 <delete permission="UPDATE_COPY">
1320                     <context link="target_copy" field="circ_lib"/>
1321                 </delete>
1322             </actions>
1323         </permacrud>
1324         </class>
1325
1326         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1327                 <fields oils_persist:primary="code">
1328                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1329                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1330                 </fields>
1331                 <links/>
1332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1333             <actions>
1334                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1335                 <retrieve/>
1336                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1337                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1338             </actions>
1339         </permacrud>
1340         </class>
1341
1342         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1343                 <fields oils_persist:primary="code">
1344                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1345                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1346                 </fields>
1347                 <links/>
1348         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1349             <actions>
1350                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1351                 <retrieve/>
1352                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1353                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1354             </actions>
1355         </permacrud>
1356         </class>
1357
1358         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1359                 <fields oils_persist:primary="code">
1360                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1361                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1362                 </fields>
1363                 <links/>
1364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1365             <actions>
1366                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1367                 <retrieve/>
1368                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1369                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1370             </actions>
1371         </permacrud>
1372         </class>
1373
1374     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1375         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1376             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1377             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1378             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1379             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1380             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1381             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1382             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1383             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1384             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1385             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1386             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1387             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1388             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1389             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1390             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1391             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1392             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1393         </fields>
1394         <links/>
1395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1396             <actions>
1397                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1398                 <retrieve/>
1399                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1400                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1401             </actions>
1402         </permacrud>
1403     </class>
1404
1405     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1406         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1407             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1408             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1409             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1410             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1411             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1412             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1413             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1414             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1415             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1416             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1417             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1418             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1419             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1420             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1421             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1422             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1423             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1424             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1425             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1426         </fields>
1427         <links/>
1428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1429             <actions>
1430                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1431                 <retrieve/>
1432                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1433                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1434             </actions>
1435         </permacrud>
1436     </class>
1437
1438     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1439         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1440             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1441             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1442             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1443             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1444             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1445         </fields>
1446         <links>
1447             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1448             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1449             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1450         </links>
1451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1452             <actions>
1453                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1454                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1455                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1456                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1457             </actions>
1458         </permacrud>
1459     </class>
1460
1461         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1462                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1463                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1464                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1465                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1466                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1467                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1468                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1469                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1470                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1471                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1472                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1473                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1474                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1475                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1476                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1477                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1478                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1479             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1480                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1481                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1482                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1483                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1484                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1485                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1486                 </fields>
1487                 <links>
1488                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1489                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1490                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1491                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1492                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1493                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1494                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1495                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1496                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1497                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1498                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1499                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1500                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1501             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1502                 </links>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1506                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1507                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1508                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1509             </actions>
1510         </permacrud>
1511         </class>
1512
1513         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1514                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1515                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1516                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1517                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1518                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1519                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1520                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1521                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1522                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1523                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1524                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1525                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1526                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1527                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1528                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1529                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1530             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1531                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1532                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1533             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1534                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1535                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1536                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1537                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1538             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1539             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1540             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1541                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1542                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1543                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1544                 </fields>
1545                 <links>
1546                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1547                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1548                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1549                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1550                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1551                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1552                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1553                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1554                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1555                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1556                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1557                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1558                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1559                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1560             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1561                 </links>
1562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1563             <actions>
1564                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1565                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1566                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1567                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1568             </actions>
1569         </permacrud>
1570         </class>
1571
1572     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1573         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1574             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1575             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1576             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1577         </fields>
1578         <links/>
1579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1580             <actions>
1581                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1582                 <retrieve/>
1583                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1584                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1585             </actions>
1586         </permacrud>
1587     </class>
1588
1589     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1590         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1591             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1592             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1593             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1594             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1595             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1596             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1597             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1598         </fields>
1599         <links>
1600             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1601         </links>
1602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1603             <actions>
1604                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1605                 <retrieve/>
1606                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1607                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1608             </actions>
1609         </permacrud>
1610     </class>
1611
1612     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1613         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1614             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1615             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1616             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1617             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1618             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1619         </fields>
1620         <links>
1621             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1622             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1623         </links>
1624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1625             <actions>
1626                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1627                     <context link="matchpoint" field="org_unit"/>
1628                 </create>
1629                 <retrieve/>
1630                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1631                     <context link="matchpoint" field="org_unit"/>
1632                 </update>
1633                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1634                     <context link="matchpoint" field="org_unit"/>
1635                 </delete>
1636             </actions>
1637         </permacrud>
1638     </class>
1639
1640     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1641         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1642             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1643             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1644             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1645         </fields>
1646         <links>
1647             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1648             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1649         </links>
1650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1651             <actions>
1652                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1653                     <context link="limit_set" field="owning_lib"/>
1654                 </create>
1655                 <retrieve/>
1656                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1657                     <context link="limit_set" field="owning_lib"/>
1658                 </update>
1659                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1660                     <context link="limit_set" field="owning_lib"/>
1661                 </delete>
1662             </actions>
1663         </permacrud>
1664     </class>
1665     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
1666         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1667             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1668             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1669             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1670         </fields>
1671         <links>
1672             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1673             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1674         </links>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1678                     <context link="limit_set" field="owning_lib"/>
1679                 </create>
1680                 <retrieve/>
1681                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1682                     <context link="limit_set" field="owning_lib"/>
1683                 </update>
1684                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1685                     <context link="limit_set" field="owning_lib"/>
1686                 </delete>
1687             </actions>
1688         </permacrud>
1689     </class>
1690
1691     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1692         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1693             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1694             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1695             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1696             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1697         </fields>
1698         <links>
1699             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1700             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1701         </links>
1702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1703             <actions>
1704                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1705                     <context link="limit_set" field="owning_lib"/>
1706                 </create>
1707                 <retrieve/>
1708                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1709                     <context link="limit_set" field="owning_lib"/>
1710                 </update>
1711                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1712                     <context link="limit_set" field="owning_lib"/>
1713                 </delete>
1714             </actions>
1715         </permacrud>
1716     </class>
1717
1718         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
1719                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1720                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1721                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1722                 </fields>
1723                 <links/>
1724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1725             <actions>
1726                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1727                 <retrieve/>
1728                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1729                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1730             </actions>
1731         </permacrud>
1732         </class>
1733
1734         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
1735                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1736                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1737                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1738                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1739                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1740                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1741                 </fields>
1742                 <links>
1743                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1744                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1745                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1746                 </links>
1747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1748             <actions>
1749                 <create permission="ADMIN_SURVEY">
1750                     <context link="survey" field="owner"/>
1751                 </create>
1752                 <retrieve/>
1753                 <update permission="ADMIN_SURVEY">
1754                     <context link="survey" field="owner"/>
1755                 </update>
1756                 <delete permission="ADMIN_SURVEY">
1757                     <context link="survey" field="owner"/>
1758                 </delete>
1759             </actions>
1760         </permacrud>
1761         </class>
1762         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1763                 <fields oils_persist:primary="id" oils_persist:sequence="">
1764                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1765                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1766                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1767                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1768                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1769                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1770                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1771                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1772                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1773                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1774                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1775                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1776                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1777                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1778                 </fields>
1779                 <links>
1780                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1781                 </links>
1782         </class>
1783         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
1784                 <fields oils_persist:primary="id" oils_persist:sequence="">
1785                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1786                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1787                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1788                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1789                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1790                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1791                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1792                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1793                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1794                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1795                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1796                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1797                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1798                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1799                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1800                 </fields>
1801                 <links>
1802                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1803                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1804                 </links>
1805         </class>
1806         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1807                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1808                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1809                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1810                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1811                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1812                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1813                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1814                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1815                 </fields>
1816                 <links>
1817                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1818                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1819                 </links>
1820         </class>
1821         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
1822                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1823                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1824                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1825                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1826                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1827                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1828                 </fields>
1829                 <links>
1830                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1831                 </links>
1832         </class>
1833         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1834                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1835                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1836                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1837                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1838                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1839                 </fields>
1840                 <links>
1841                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1842                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1843                 </links>
1844         </class>
1845         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
1846                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1847                         <field name="field" reporter:datatype="link"/>
1848                         <field name="id" reporter:datatype="id" />
1849                         <field name="source" reporter:datatype="link"/>
1850                         <field name="value" reporter:datatype="text"/>
1851                 </fields>
1852                 <links>
1853                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1854                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1855                 </links>
1856         </class>
1857         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
1858                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1859                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1860                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1861                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1862                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1863                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1864                 </fields>
1865                 <links>
1866                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1867                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1868                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1869                 </links>
1870         </class>
1871         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
1872                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1873                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1874                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1875                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1876                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1877                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1878                 </fields>
1879                 <links>
1880                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1881                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1882                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1883                 </links>
1884         </class>
1885         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
1886                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1887                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1888                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1889                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1890                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1891                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1892                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1893                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1894                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1895                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1896                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1897                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1898                 </fields>
1899                 <links>
1900                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1901                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1902                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1903                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1904                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1905                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1906                 </links>
1907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1908             <actions>
1909                 <create permission="TRANSIT_COPY" context_field="owner">
1910                     <context link="target_copy" field="circ_lib"/>
1911                 </create>
1912                 <retrieve/>
1913                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1914                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1915             </actions>
1916         </permacrud>
1917         </class>
1918         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
1919                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1920                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1921                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1922                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1923                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1924                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1925                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1926                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1927                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1928                 </fields>
1929                 <links>
1930                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1931                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1932                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1933                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1934                 </links>
1935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1936             <actions>
1937                 <create permission="ADMIN_SURVEY">
1938                     <context link="survey" field="owner"/>
1939                 </create>
1940                 <retrieve/>
1941                 <update permission="ADMIN_SURVEY">
1942                     <context link="survey" field="owner"/>
1943                 </update>
1944                 <delete permission="ADMIN_SURVEY">
1945                     <context link="survey" field="owner"/>
1946                 </delete>
1947             </actions>
1948         </permacrud>
1949         </class>
1950         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
1951                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1952                         <field name="bucket" />
1953                         <field name="id" reporter:datatype="id" />
1954                         <field name="target_copy" reporter:datatype="link"/>
1955                         <field name="create_time" reporter:datatype="timestamp" />
1956                         <field name="pos" reporter:datatype="int" />
1957                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1958                 </fields>
1959                 <links>
1960                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1961                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1962             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1963                 </links>
1964         </class>
1965         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
1966                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1967                         <field name="id" reporter:datatype="id" />
1968                         <field name="item" reporter:datatype="link"/>
1969                         <field name="note" reporter:datatype="text" />
1970                 </fields>
1971                 <links>
1972                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1973                 </links>
1974         </class>
1975
1976         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
1977                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1978                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1979                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1980                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1981                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1982                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1983                 </fields>
1984                 <links>
1985                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1986                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1987                 </links>
1988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1989                         <actions>
1990                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1991                                 <retrieve/>
1992                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1993                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1994                         </actions>
1995                 </permacrud>
1996         </class>
1997
1998         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
1999                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2000                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2001                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2002                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2003                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2004                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2005                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2006                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2007                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2008                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2009                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2010                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2011                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2012                 </fields>
2013                 <links>
2014                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2015                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2016                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2017                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2018                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2019                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2020                 </links>
2021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022                         <actions>
2023                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2024                                 <retrieve/>
2025                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2026                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2027                         </actions>
2028                 </permacrud>
2029         </class>
2030
2031         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2032                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2033                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2034                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2035                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2036                 </fields>
2037                 <links>
2038                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2039                 </links>
2040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2041                         <actions>
2042                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2043                                 <retrieve/>
2044                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2045                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2046                         </actions>
2047                 </permacrud>
2048         </class>
2049
2050         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2051                 <fields oils_persist:primary="code">
2052                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2053                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2054                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2055                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2056                 </fields>
2057                 <links>
2058                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2059                 </links>
2060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2061                         <actions>
2062                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2063                                 <retrieve/>
2064                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2065                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2066                         </actions>
2067                 </permacrud>
2068         </class>
2069
2070         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2071                 <fields oils_persist:primary="code">
2072                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2073                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2074                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2075                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2076                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2077                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2078                 </fields>
2079                 <links>
2080                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2081                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2082                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2083                 </links>
2084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2085                         <actions>
2086                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2087                                 <retrieve/>
2088                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2089                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2090                         </actions>
2091                 </permacrud>
2092         </class>
2093
2094     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2095         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2096             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2097             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2098             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2099         </fields>
2100         <links>
2101             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2102             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2103         </links>
2104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2105             <actions>
2106                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2107                 <retrieve/>
2108                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2109                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2110             </actions>
2111         </permacrud>
2112     </class>
2113
2114         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2115                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2116                         <field name="active" reporter:datatype="bool"/>
2117                         <field name="create_date" reporter:datatype="timestamp"/>
2118                         <field name="creator" />
2119                         <field name="deleted" reporter:datatype="bool"/>
2120                         <field name="edit_date" reporter:datatype="timestamp"/>
2121                         <field name="editor" />
2122                         <field name="id" reporter:datatype="id" />
2123                         <field name="last_xact_id" />
2124                         <field name="marc" />
2125                         <field name="source" />
2126                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2127                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2128                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2129                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2130                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2131                 </fields>
2132                 <links>
2133                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2134                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2135                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2136                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2137                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2138                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2139                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2140                 </links>
2141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2142                         <actions>
2143                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2144                                 <retrieve/>
2145                                 <update permission="UPDATE_MARC" global_required="true"/>
2146                                 <delete permission="UPDATE_MARC" global_required="true"/>
2147                         </actions>
2148                 </permacrud>
2149         </class>
2150         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2151                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2152                         <field name="char_encoding" />
2153                         <field name="id" />
2154                         <field name="record" />
2155                         <field name="record_status" />
2156                         <field name="thesaurus" />
2157                 </fields>
2158                 <links>
2159                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2160                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2161                 </links>
2162         </class>
2163         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2164                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2165                         <field name="id" reporter:datatype="id" />
2166                         <field name="bib" reporter:datatype="link" />
2167                         <field name="authority" reporter:datatype="link" />
2168                 </fields>
2169                 <links>
2170                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2171                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2172                 </links>
2173         </class>
2174         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2175                 <fields oils_persist:primary="code" oils_persist:sequence="">
2176                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2177                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2178                 </fields>
2179                 <links/>
2180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2181             <actions>
2182                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2183                 <retrieve/>
2184                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2185                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2186             </actions>
2187         </permacrud>
2188         </class>
2189         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2190                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2191                         <field name="accepting_usr" />
2192                         <field name="amount" reporter:datatype="money" />
2193                         <field name="amount_collected" reporter:datatype="money" />
2194                         <field name="approval_code" reporter:datatype="text"/>
2195                         <field name="cash_drawer" reporter:datatype="link"/>
2196                         <field name="cc_first_name" reporter:datatype="text"/>
2197                         <field name="cc_last_name" reporter:datatype="text"/>
2198                         <field name="cc_number" reporter:datatype="text"/>
2199                         <field name="cc_order_number" reporter:datatype="text"/>
2200                         <field name="cc_type" reporter:datatype="text"/>
2201                         <field name="cc_processor" reporter:datatype="text"/>
2202                         <field name="expire_month" reporter:datatype="int" />
2203                         <field name="expire_year" reporter:datatype="int" />
2204                         <field name="id" reporter:datatype="id" />
2205                         <field name="note" reporter:datatype="text"/>
2206                         <field name="payment_ts" reporter:datatype="timestamp"/>
2207                         <field name="xact" reporter:datatype="link"/>
2208                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2209                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2210                 </fields>
2211                 <links>
2212                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2213                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2214                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2215                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2216                 </links>
2217         </class>
2218         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
2219                 <fields oils_persist:primary="name">
2220                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2221                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2222                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2223                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2224                 </fields>
2225                 <links/>
2226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2227             <actions>
2228                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2229                 <retrieve/>
2230                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2231                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2232             </actions>
2233         </permacrud>
2234         </class>
2235
2236         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2237                 <fields oils_persist:primary="alias">
2238                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2239                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2240                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2241                 </fields>
2242                 <links>
2243                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2244                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2245                 </links>
2246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2247             <actions>
2248                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2249                 <retrieve/>
2250                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2251                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2252             </actions>
2253         </permacrud>
2254         </class>
2255
2256         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2257                 <fields oils_persist:primary="name">
2258                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2259                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2260                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2261                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2262                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2263                 </fields>
2264                 <links>
2265                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2266                 </links>
2267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2268             <actions>
2269                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2270                 <retrieve/>
2271                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2272                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2273             </actions>
2274         </permacrud>
2275         </class>
2276
2277         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2278                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2279                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2280                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2281                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2282                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2283                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2284                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2285                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2286                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2287                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2288                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2289                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2290                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2291                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2292                 </fields>
2293                 <links>
2294                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2295                 </links>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2299                 <retrieve/>
2300                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2301                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2302             </actions>
2303         </permacrud>
2304         </class>
2305         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2307                         <field name="id" reporter:datatype="id" />
2308                         <field name="name" reporter:datatype="text"/>
2309                         <field name="xpath" reporter:datatype="text"/>
2310                         <field name="format" reporter:datatype="link"/>
2311                         <field name="first_word" reporter:datatype="bool" />
2312                 </fields>
2313                 <links/>
2314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2315             <actions>
2316                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2317                 <retrieve/>
2318                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2319                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
2324                 <fields oils_persist:primary="code" oils_persist:sequence="">
2325                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2326                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2327                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2328                 </fields>
2329                 <links/>
2330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2331             <actions>
2332                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2333                 <retrieve/>
2334                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2335                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2336             </actions>
2337         </permacrud>
2338         </class>
2339         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
2340                 <fields oils_persist:primary="code" oils_persist:sequence="">
2341                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2342                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2343                 </fields>
2344                 <links/>
2345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2346             <actions>
2347                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2348                 <retrieve/>
2349                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2350                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2351             </actions>
2352         </permacrud>
2353         </class>
2354     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2355         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2356             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2357             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2358             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2359             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2360         </fields>
2361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2362             <actions>
2363                 <retrieve/>
2364             </actions>
2365         </permacrud>
2366     </class>
2367         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2368                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2369                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2370                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2371                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2372                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2373                 </fields>
2374                 <links>
2375                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2376                 </links>
2377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2378             <actions>
2379                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2380                 <retrieve/>
2381                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2382                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2383             </actions>
2384         </permacrud>
2385         </class>
2386         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2387                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2388                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2389                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2390                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2391                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2392                 </fields>
2393                 <links>
2394                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2395                 </links>
2396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2397             <actions>
2398                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2399                 <retrieve/>
2400                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2401                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2402             </actions>
2403         </permacrud>
2404         </class>
2405         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
2406                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2407                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2408                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2409                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2410                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2411                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2412                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2413                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2414                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2415                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2416                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2417                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2418                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2419                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2420                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2421                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2422                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2423                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2424                 </fields>
2425                 <links>
2426                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2427                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2428                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2429                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2430                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2431                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2432                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2433                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2434                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2435                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2436                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2437                 </links>
2438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2439             <actions>
2440                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2441                 <retrieve/>
2442                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2443                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2444             </actions>
2445         </permacrud>
2446         </class>
2447         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2448                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2449                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2450                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2451                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2452                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2453                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2454                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2455                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2456                 </fields>
2457                 <links>
2458                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2459                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2460         </links>
2461         </class>
2462         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
2463                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2464                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2465                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2466                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2467                 </fields>
2468                 <links>
2469                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2470                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2471                 </links>
2472         </class>
2473         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2474                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2475                         <field name="id" reporter:datatype="id" />
2476                         <field name="value" oils_persist:i18n="true" />
2477                 </fields>
2478                 <links/>
2479         </class>
2480         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
2481                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2482                         <field name="balance_owed" reporter:datatype="money" />
2483                         <field name="total_owed" reporter:datatype="money" />
2484                         <field name="total_paid" reporter:datatype="money" />
2485                         <field name="usr" reporter:datatype="link"/>
2486                 </fields>
2487                 <links>
2488                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2489         </links>
2490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2491             <actions>
2492                 <retrieve permission="VIEW_USER">
2493                     <context link="usr" field="home_ou"/>
2494                 </retrieve>
2495             </actions>
2496         </permacrud>
2497         </class>
2498         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
2499                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2500                         <field name="collector" />
2501                         <field name="enter_time" reporter:datatype="timestamp"/>
2502                         <field name="id" reporter:datatype="id" />
2503                         <field name="location" reporter:datatype="link"/>
2504                         <field name="usr" reporter:datatype="link"/>
2505                 </fields>
2506                 <links>
2507                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2508                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2509                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2510                 </links>
2511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2512             <actions>
2513                 <create permission="money.collections_tracker.create" context_field="location"/>
2514                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2515                 <delete permission="money.collections_tracker.create" context_field="location"/>
2516             </actions>
2517         </permacrud>
2518         </class>
2519         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
2520                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2521                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2522                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2523                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2524                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2525                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2526                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2527                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2528                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2529                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2530                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2531                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2532                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2533                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2534                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2535                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2536                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2537                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2538                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2539                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2540                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2541                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2542                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2543                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2544                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2545                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2546                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2547                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2548                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2549                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2550                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2551                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2552                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2553                 </fields>
2554                 <links>
2555                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2556                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2557                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2558                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2559                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2560                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2561                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2562                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2563                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2564                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2565                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2566                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2567                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2568                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2569                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2570                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2571                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2572                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2573                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2574                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2575                 </links>
2576         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2577             <actions>
2578                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2579                 <retrieve/>
2580                 <update permission="UPDATE_MARC" global_required="true"/>
2581             </actions>
2582         </permacrud>
2583         </class>
2584         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
2585                 <fields oils_persist:primary="id">
2586                         <field name="dow_0_close" />
2587                         <field name="dow_0_open" />
2588                         <field name="dow_1_close" />
2589                         <field name="dow_1_open" />
2590                         <field name="dow_2_close" />
2591                         <field name="dow_2_open" />
2592                         <field name="dow_3_close" />
2593                         <field name="dow_3_open" />
2594                         <field name="dow_4_close" />
2595                         <field name="dow_4_open" />
2596                         <field name="dow_5_close" />
2597                         <field name="dow_5_open" />
2598                         <field name="dow_6_close" />
2599                         <field name="dow_6_open" />
2600                         <field name="id" reporter:datatype="id" />
2601                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2602                 </fields>
2603                 <links>
2604                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2605                 </links>
2606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2607             <actions>
2608                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2609                 <retrieve/>
2610                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2611                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2612             </actions>
2613         </permacrud>
2614         </class>
2615         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2617                         <field name="id" reporter:datatype="id" />
2618                         <field name="record" reporter:datatype="link"/>
2619                         <field name="label" reporter:datatype="text"/>
2620                         <field name="label_sortkey" reporter:datatype="text"/>
2621                 </fields>
2622                 <links>
2623                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2624                 </links>
2625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2626             <actions>
2627                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2628                 <retrieve/>
2629                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2630                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2631             </actions>
2632         </permacrud>
2633         </class>
2634         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
2635                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2636                         <field name="id" reporter:datatype="id" />
2637                         <field name="target_copy" reporter:datatype="link" />
2638                         <field name="part" reporter:datatype="link"/>
2639                 </fields>
2640                 <links>
2641                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2642                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2643                 </links>
2644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2645             <actions>
2646                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2647                 <retrieve/>
2648                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2649                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2650             </actions>
2651         </permacrud>
2652         </class>
2653         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
2654                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2655                         <field name="close_end" reporter:datatype="timestamp" />
2656                         <field name="close_start" reporter:datatype="timestamp" />
2657                         <field name="id" reporter:datatype="id" />
2658                         <field name="org_unit" reporter:datatype="org_unit"/>
2659                         <field name="reason" reporter:datatype="text"/>
2660                 </fields>
2661                 <links>
2662                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2663                 </links>
2664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2665             <actions>
2666                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2667                 <retrieve/>
2668                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2669                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2670             </actions>
2671         </permacrud>
2672         </class>
2673         <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
2674                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2675                         <field name="extended" reporter:datatype="interval"/>
2676                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2677                         <field name="max_renewals" reporter:datatype="int" />
2678                         <field name="name" reporter:datatype="text"/>
2679                         <field name="normal" reporter:datatype="interval"/>
2680                         <field name="shrt" reporter:datatype="interval"/>
2681                 </fields>
2682                 <links>
2683                 </links>
2684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2685             <actions>
2686                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2687                 <retrieve/>
2688                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2689                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2690             </actions>
2691         </permacrud>
2692         </class>
2693
2694         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
2695                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2696                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2697                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2698             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2699                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2700             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2701                 </fields>
2702                 <links>
2703             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2704                 </links>
2705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2706             <actions>
2707                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2708                 <retrieve/>
2709                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2710                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2711             </actions>
2712                 </permacrud>
2713         </class>
2714
2715         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2717                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2718                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2719                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2720             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2721                 </fields>
2722                 <links>
2723                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2724                 </links>
2725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2726             <actions>
2727                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2728                 <retrieve/>
2729                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2730                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2731             </actions>
2732                 </permacrud>
2733         </class>
2734
2735         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2736                 <fields oils_persist:primary="id" oils_persist:sequence="">
2737                         <field name="balance_owed" reporter:datatype="money"/>
2738                         <field name="id" reporter:datatype="id" />
2739                         <field name="last_billing_note" reporter:datatype="text"/>
2740                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2741                         <field name="last_billing_type" reporter:datatype="text"/>
2742                         <field name="last_payment_note" reporter:datatype="text"/>
2743                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2744                         <field name="last_payment_type" reporter:datatype="text"/>
2745                         <field name="total_owed" reporter:datatype="money"/>
2746                         <field name="total_paid" reporter:datatype="money"/>
2747                         <field name="usr" reporter:datatype="link"/>
2748                         <field name="xact_finish" reporter:datatype="timestamp" />
2749                         <field name="xact_start" reporter:datatype="timestamp" />
2750                         <field name="xact_type" reporter:datatype="text"/>
2751                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2752                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2753                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2754                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2755                         <field name="billing_location" reporter:datatype="link"/>
2756                 </fields>
2757                 <links>
2758                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2759                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2760                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2761                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2762                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2763                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2764                 </links>
2765         </class>
2766         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2767                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2768                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2769                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2770                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2771                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2772                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2773                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2774                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2775                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2776                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2777                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2778                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2779                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2780                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2781                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2782                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2783                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2784                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2785                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2786                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2787                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2788                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2789                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2790                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2791                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2792                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2793                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2794                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2795                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2796                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2797                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2798                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2799                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2800                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2801                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2802                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2803                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2804                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2805                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2806                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2807                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2808                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2809                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2810                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2811                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2812                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2813                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2814                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2815                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2816                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2817                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2818                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2819                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2820                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2821                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2822                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2823                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2824                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2825                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2826                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2827                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2828                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2829                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2830                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2831                 </fields>
2832                 <links>
2833                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2834                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2835                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2836                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2837                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2838                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2839                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2840                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2841                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2842                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2843                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2844                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2845                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2846                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2847                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2848                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2849                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2850                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2851                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2852                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2853                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2854                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2855                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2856                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2857                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2858                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2859                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2860                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2861                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2862                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2863                 </links>
2864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2865                         <actions>
2866                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
2867                         </actions>
2868                 </permacrud>
2869         </class>
2870         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
2871                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2872                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2873                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2874                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2875                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2876                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2877                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2878                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2879                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2880         </fields>
2881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2882                         <actions>
2883                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2884                                 <retrieve/>
2885                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2886                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2887                         </actions>
2888                 </permacrud>
2889         </class>
2890         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
2891                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2892                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2893                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2894                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2895                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2896         </fields>
2897         <links>
2898                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2899                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2900                 </links>
2901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2902                         <actions>
2903                                 <retrieve permission="RUN_REPORTS">
2904                                         <context link="usr" field="home_ou" />
2905                                 </retrieve>
2906                         </actions>
2907                 </permacrud>
2908         </class>
2909         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2911                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2912                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2913                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2914                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2915                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2916                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2917         </fields>
2918         <links>
2919                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2920                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2921                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2922                 </links>
2923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2924                         <actions>
2925                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2926                                         <context link="usr" field="home_ou" />
2927                                         <context link="ws" field="owning_lib" />
2928                                 </retrieve>
2929                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2930                                         <context link="usr" field="home_ou" />
2931                                         <context link="ws" field="owning_lib" />
2932                                 </create>
2933                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2934                                         <context link="usr" field="home_ou" />
2935                                         <context link="ws" field="owning_lib" />
2936                                 </update>
2937                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2938                                         <context link="usr" field="home_ou" />
2939                                         <context link="ws" field="owning_lib" />
2940                                 </delete>
2941                         </actions>
2942                 </permacrud>
2943         </class>
2944         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
2945                 <fields oils_persist:primary="name">
2946                         <field name="name" reporter:datatype="text"/>
2947                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2948                 </fields>
2949                 <links/>
2950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2951                         <actions>
2952                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2953                                 <retrieve/>
2954                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2955                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2956                         </actions>
2957                 </permacrud>
2958         </class>
2959         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
2960                 <fields oils_persist:primary="name">
2961                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2962                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2963                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2964                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2965                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2966                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2967                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2968                 </fields>
2969                 <links>
2970                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2971                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2972                 </links>
2973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2974                         <actions>
2975                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2976                                 <retrieve/>
2977                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2978                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2979                         </actions>
2980                 </permacrud>
2981         </class>
2982         <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
2983                 <fields oils_persist:primary="name">
2984                         <field name="name" reporter:datatype="text"/>
2985                         <field name="label" reporter:datatype="text"/>
2986                         <field name="description" reporter:datatype="text"/>
2987                         <field name="datatype" reporter:datatype="text"/>
2988                         <field name="view_perm" reporter:datatype="link"/>
2989                         <field name="update_perm" reporter:datatype="link"/>
2990                         <field name="fm_class" reporter:datatype="text"/>
2991                         <field name="grp" reporter:datatype="link"/>
2992                 </fields>
2993                 <links>
2994                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2995                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2996                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2997                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2998                 </links>
2999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3000                         <actions>
3001                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3002                                 <retrieve/>
3003                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3004                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3005                         </actions>
3006                 </permacrud>
3007         </class>
3008         <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
3009                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3010                         <field name="id" />
3011                         <field name="name"  reporter:datatype="text"/>
3012                         <field name="org_unit" reporter:datatype="org_unit"/>
3013                         <field name="value"  reporter:datatype="text"/>
3014                 </fields>
3015                 <links>
3016                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3017                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3018                 </links>
3019         </class>
3020         <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
3021                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3022                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3023                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3024                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3025                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3026                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3027                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3028                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3029                 </fields>
3030                 <links>
3031                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3032                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3033                 </links>
3034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3035             <actions>
3036                 <create permission="CREATE_COPY_NOTE">
3037                     <context link="owning_copy" field="circ_lib"/>
3038                 </create>
3039                 <retrieve permission="VIEW_COPY_NOTES">
3040                     <context link="owning_copy" field="circ_lib"/>
3041                 </retrieve>
3042                 <update permission="UPDATE_COPY_NOTE">
3043                     <context link="owning_copy" field="circ_lib"/>
3044                 </update>
3045                 <delete permission="DELETE_COPY_NOTE">
3046                     <context link="owning_copy" field="circ_lib"/>
3047                 </delete>
3048             </actions>
3049         </permacrud>
3050         </class>
3051         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3052                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3053                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3054                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3055                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3056                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3057                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3058                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3059                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3060                 </fields>
3061                 <links>
3062                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3063                 </links>
3064         </class>
3065         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3066                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3067                         <field name="fingerprint"  reporter:datatype="text"/>
3068                         <field name="id" reporter:datatype="id" />
3069                         <field name="master_record" reporter:datatype="link"/>
3070                         <field name="mods"  reporter:datatype="text"/>
3071                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3072                 </fields>
3073                 <links>
3074                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3075                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3076                 </links>
3077         </class>
3078         <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
3079                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3080                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3081                         <field name="name"  reporter:datatype="text"/>
3082                 </fields>
3083                 <links/>
3084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3085             <actions>
3086                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3087                 <retrieve/>
3088                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3089                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3090             </actions>
3091         </permacrud>
3092         </class>
3093         <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
3094                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3095                         <field name="code"  reporter:datatype="text"/>
3096                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3097                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3098                 </fields>
3099                 <links/>
3100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3101             <actions>
3102                 <create permission="CREATE_PERM" global_required="true"/>
3103                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3104                 <update permission="UPDATE_PERM" global_required="true"/>
3105                 <delete permission="DELETE_PERM" global_required="true"/>
3106             </actions>
3107         </permacrud>
3108         </class>
3109         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3110                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3111                         <field name="id" reporter:datatype="id" />
3112                         <field name="metarecord" reporter:datatype="link"/>
3113                         <field name="source" reporter:datatype="link"/>
3114                 </fields>
3115                 <links>
3116                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3117                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3118                 </links>
3119         </class>
3120         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
3121                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3122                         <field name="id" reporter:datatype="id" />
3123                         <field name="field" reporter:datatype="link"/>
3124                         <field name="source" reporter:datatype="link"/>
3125                         <field name="value"  reporter:datatype="text"/>
3126                 </fields>
3127                 <links>
3128                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3129                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3130                 </links>
3131         </class>
3132         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
3133                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3134                         <field name="id" reporter:datatype="id" />
3135                         <field name="value" reporter:datatype="text"/>
3136                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3137                 </fields>
3138                 <links>
3139                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3140                 </links>
3141         </class>
3142         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
3143                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3144                         <field name="id" reporter:datatype="id" />
3145                         <field name="entry" reporter:datatype="link"/>
3146                         <field name="def" reporter:datatype="link"/>
3147                         <field name="source" reporter:datatype="link"/>
3148                 </fields>
3149                 <links>
3150                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3151                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3152                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3153                 </links>
3154         </class>
3155         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
3156                 <oils_persist:source_definition>
3157                         SELECT * FROM metabib.author_field_entry
3158                                                 UNION ALL
3159                         SELECT * FROM metabib.keyword_field_entry
3160                                                 UNION ALL
3161                         SELECT * FROM metabib.identifier_field_entry
3162                                                 UNION ALL
3163                         SELECT * FROM metabib.title_field_entry
3164                                                 UNION ALL
3165                         SELECT * FROM metabib.subject_field_entry
3166                                                 UNION ALL
3167                         SELECT * FROM metabib.series_field_entry
3168                 </oils_persist:source_definition>
3169                 <fields>
3170                         <field name="field" reporter:datatype="link"/>
3171                         <field name="id" reporter:datatype="id" />
3172                         <field name="source" reporter:datatype="link"/>
3173                         <field name="value"  reporter:datatype="text"/>
3174                 </fields>
3175                 <links>
3176                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3177                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3178                 </links>
3179         </class>
3180         <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
3181                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3182                         <field name="field" reporter:datatype="link"/>
3183                         <field name="id" reporter:datatype="id" />
3184                         <field name="source" reporter:datatype="link"/>
3185                         <field name="value"  reporter:datatype="text"/>
3186                 </fields>
3187                 <links>
3188                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3189                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3190                 </links>
3191         </class>
3192         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3193                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3194                         <field name="accepting_usr" reporter:datatype="link"/>
3195                         <field name="amount" reporter:datatype="money" />
3196                         <field name="amount_collected" reporter:datatype="money" />
3197                         <field name="cash_drawer" reporter:datatype="link"/>
3198                         <field name="id" reporter:datatype="id" />
3199                         <field name="note"  reporter:datatype="text"/>
3200                         <field name="payment_ts" reporter:datatype="timestamp"/>
3201                         <field name="xact" reporter:datatype="link"/>
3202                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3203                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3204                 </fields>
3205                 <links>
3206                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3207                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3208                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3209                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3210                 </links>
3211         </class>
3212         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3213                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3214                         <field name="accepting_usr" reporter:datatype="link"/>
3215                         <field name="amount" reporter:datatype="money" />
3216                         <field name="amount_collected" reporter:datatype="money" />
3217                         <field name="id" reporter:datatype="id" />
3218                         <field name="note"  reporter:datatype="text"/>
3219                         <field name="payment_ts" reporter:datatype="timestamp"/>
3220                         <field name="xact" reporter:datatype="link"/>
3221                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3222                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3223                 </fields>
3224                 <links>
3225                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3226                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3227                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3228                 </links>
3229         </class>
3230         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3231                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3232                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3233                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3234                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3235                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3236                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3237                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3238                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3239                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3240                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3241                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3242                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3243                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3244                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3245                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3246                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3247                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3248                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3249                 </fields>
3250                 <links>
3251                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3252                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3253                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3254                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3255                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3256                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3257                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3258                 </links>
3259         </class>
3260
3261         <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
3262                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3263                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3264                         <field name="name"  reporter:datatype="text"/>
3265                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3266                         <field name="block_list" reporter:datatype="text"/>
3267                         <field name="staff_alert" reporter:datatype="bool"/>
3268                         <field name="org_depth" reporter:datatype="int"/>
3269                 </fields>
3270                 <links/>
3271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3272             <actions>
3273                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3274                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3275                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3276                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3277             </actions>
3278         </permacrud>
3279         </class>
3280         <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">
3281                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3282                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3283                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3284                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3285                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3286                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3287                 </fields>
3288                 <links>
3289                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3290                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3291                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3292         </links>
3293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3294             <actions>
3295                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3296                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3297                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3298                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3299             </actions>
3300         </permacrud>
3301         </class>
3302         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
3303                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3304                         <field name="holdable" reporter:datatype="bool"/>
3305                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3306                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3307                         <field name="opac_visible" reporter:datatype="bool"/>
3308             <field name="copy_active" reporter:datatype="bool"/>
3309             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3310                 </fields>
3311                 <links/>
3312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3313             <actions>
3314                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3315                 <retrieve/>
3316                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3317                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3318             </actions>
3319         </permacrud>
3320         </class>
3321         <class id="ausp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty" oils_persist:restrict_primary="100" reporter:label="User Standing Penalty">
3322                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3323                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3324                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3325                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3326                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3327                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3328                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3329                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3330                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3331                 </fields>
3332                 <links>
3333                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3334                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3335                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3336                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3337                 </links>
3338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3339                         <actions>
3340                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3341                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3342                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3343                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3344                         </actions>
3345                 </permacrud>
3346         </class>
3347         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3348                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3349                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3350                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3351                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3352                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3353                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3354                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3355                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3356                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3357                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3358                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3359                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3360                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3361                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3362                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3363                 </fields>
3364                 <links>
3365                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3366                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3367                 </links>
3368         </class>
3369         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
3370                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3371                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3372                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3373                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3374                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3375                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3376                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3377                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3378                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3379                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3380                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3381                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3382                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3383                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3384                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3385                 </fields>
3386                 <links>
3387                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3388                 </links>
3389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3390                         <actions>
3391                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3392                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3393                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3394                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3395                         </actions>
3396                 </permacrud>
3397         </class>
3398
3399
3400         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
3401                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3402                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3403                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3404                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3405                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3406                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3407                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3408                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3409                 </fields>
3410                 <links>
3411                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3412                 </links>
3413         </class>
3414
3415         <class id="acnn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_note" oils_persist:tablename="asset.call_number_note" reporter:label="Call Number Note">
3416                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3417                         <field name="call_number" />
3418                         <field name="create_date" reporter:datatype="timestamp"/>
3419                         <field name="creator" reporter:datatype="link"/>
3420                         <field name="id" reporter:datatype="id" />
3421                         <field name="pub" reporter:datatype="bool"/>
3422                         <field name="title"  reporter:datatype="text"/>
3423                         <field name="value"  reporter:datatype="text"/>
3424                 </fields>
3425                 <links>
3426                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3427                 </links>
3428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3429             <actions>
3430                 <create permission="CREATE_VOLUME_NOTE">
3431                     <context link="call_number" field="owning_lib"/>
3432                 </create>
3433                 <retrieve permission="VIEW_VOLUME_NOTES">
3434                     <context link="call_number" field="owning_lib"/>
3435                 </retrieve>
3436                 <update permission="UPDATE_VOLUME_NOTE">
3437                     <context link="call_number" field="owning_lib"/>
3438                 </update>
3439                 <delete permission="DELETE_VOLUME_NOTE">
3440                     <context link="call_number" field="owning_lib"/>
3441                 </delete>
3442             </actions>
3443         </permacrud>
3444         </class>
3445         <class id="arn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_note" oils_persist:tablename="authority.record_note" reporter:label="Authority Record Note">
3446                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3447                         <field name="create_date" reporter:datatype="timestamp"/>
3448                         <field name="creator" reporter:datatype="link"/>
3449                         <field name="edit_date" reporter:datatype="timestamp"/>
3450                         <field name="editor" reporter:datatype="link"/>
3451                         <field name="id" reporter:datatype="id" />
3452                         <field name="record" reporter:datatype="link"/>
3453                         <field name="value" reporter:datatype="text"/>
3454                 </fields>
3455                 <links>
3456                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3457                 </links>
3458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3459             <actions>
3460                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3461                 <retrieve/>
3462                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3463                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3464             </actions>
3465         </permacrud>
3466         </class>
3467         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3468         <oils_persist:source_definition>
3469 SELECT  usr,
3470         SUM(
3471             CASE
3472                 WHEN (
3473                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3474                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3475                 ) THEN 1
3476                 ELSE 0
3477             END
3478         ) AS out,
3479
3480         SUM(
3481             CASE
3482                 WHEN (
3483                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3484                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3485                 ) THEN 1
3486                 ELSE 0
3487             END
3488         ) AS overdue,
3489
3490         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3491         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3492         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3493   FROM  action.circulation
3494   WHERE checkin_time IS NULL
3495   GROUP BY 1
3496         </oils_persist:source_definition>
3497         <fields oils_persist:primary="usr">
3498             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3499             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3500             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3501             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3502             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3503             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3504         </fields>
3505         <links>
3506             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3507         </links>
3508         </class>
3509         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3510         <oils_persist:source_definition>
3511 SELECT  usr,
3512         ARRAY_TO_STRING(ARRAY_ACCUM(
3513             CASE
3514                 WHEN (
3515                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3516                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3517                 ) THEN id
3518                 ELSE 0
3519             END
3520         ),',') AS out,
3521
3522         ARRAY_TO_STRING(ARRAY_ACCUM(
3523             CASE
3524                 WHEN (
3525                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3526                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3527                 ) THEN id
3528                 ELSE 0
3529             END
3530         ),',') AS overdue,
3531
3532         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3533         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3534         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3535   FROM  action.circulation
3536   WHERE checkin_time IS NULL
3537   GROUP BY 1
3538         </oils_persist:source_definition>
3539         <fields oils_persist:primary="usr">
3540             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3541             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3542             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3543             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3544             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3545             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3546         </fields>
3547         <links>
3548             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3549         </links>
3550         </class>
3551         <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3552                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3553                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3554                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3555                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3556                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3557                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3558                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3559                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3560                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3561                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3562                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3563                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3564                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3565                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3566                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3567                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3568                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3569                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3570                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3571                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3572                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3573                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3574                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3575                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3576                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3577                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3578                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3579                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3580                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3581                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3582                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3583                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3584                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3585                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3586                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3587                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3588                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3589                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3590                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3591                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3592                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3593                 </fields>
3594                 <links>
3595                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3596                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3597                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3598                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3599                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3600                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3601                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3602                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3603                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3604                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3605                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3606                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3607                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3608                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3609                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3610                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3611                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3612                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3613                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3614                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3615                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3616                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3617                 </links>
3618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3619                         <actions>
3620                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3621                         </actions>
3622                 </permacrud>
3623         </class>
3624         <class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
3625                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3626                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3627                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3628                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3629                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3630                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3631                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3632                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3633                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3634                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3635                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3636                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3637                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3638                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3639                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3640                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3641                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3642                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3643                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3644                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3645                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3646                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3647                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3648                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3649                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3650                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3651                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3652                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3653                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3654                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3655                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3656                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3657                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3658                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3659                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3660                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3661                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3662                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3663                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3664                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3665                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3666                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3667                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3668                 </fields>
3669                 <links>
3670                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3671                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3672                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3673                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3674                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3675                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3676                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3677                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3678                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3679                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3680                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3681                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3682                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3683                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3684                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3685                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3686                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3687                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3688                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3689                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3690                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3691                 </links>
3692         </class>
3693         <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">
3694                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3695                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3696                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3697                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3698                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3699                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3700                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3701                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3702                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3703                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3704                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3705                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3706                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3707                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3708                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3709                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3710                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3711                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3712                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3713                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3714                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3715                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3716                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3717                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3718                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3719                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3720                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3721                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3722                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3723                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3724                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3725                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3726                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3727                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3728                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3729                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3730                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3731                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3732                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3733                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3734                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3735                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3736                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3737                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3738                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3739                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3740                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3741                 </fields>
3742                 <links>
3743                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3744                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3745                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3746                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3747                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3748                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3749                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3750                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3751                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3752                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3753                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3754                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3755                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3756                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3757                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3758                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3759                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3760                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3761                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3762                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3763                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3764                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3765                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3766                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3767                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3768                 </links>
3769         </class>
3770
3771         <class id="brt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_type" oils_persist:tablename="booking.resource_type" reporter:label="Resource Type">
3772                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3773                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3774                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3775                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3776                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3777                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3778                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3779                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3780                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3781                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3782                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3783                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3784                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3785                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3786                 </fields>
3787                 <links>
3788                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3789                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3790                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3791                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3792                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3793                 </links>
3794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3795                         <actions>
3796                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3797                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3798                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3799                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3800                         </actions>
3801                 </permacrud>
3802         </class>
3803
3804         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3805                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3806                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3807                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3808                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3809                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3810                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3811                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3812                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3813                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3814                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3815                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3816                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3817                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3818                 </fields>
3819                 <links>
3820                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3821                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3822                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3823                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3824                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3825                 </links>
3826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3827                         <actions>
3828                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3829                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3830                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3831                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3832                         </actions>
3833                 </permacrud>
3834         </class>
3835         
3836         <class id="bra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr" oils_persist:tablename="booking.resource_attr" reporter:label="Resource Attribute">
3837                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3838                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3839                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3840                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3841                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3842                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3843                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3844                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3845                 </fields>
3846                 <links>
3847                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3848                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3849                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3850                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3851                 </links>
3852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3853                         <actions>
3854                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3855                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3856                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3857                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3858                         </actions>
3859                 </permacrud>
3860         </class>
3861         
3862         <class id="brav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_value" oils_persist:tablename="booking.resource_attr_value" reporter:label="Resource Attribute Value">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3864                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3865                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3866                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3867                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3868                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3869                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3870                 </fields>
3871                 <links>
3872                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3873                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3874                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3875                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3876                 </links>
3877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3878                         <actions>
3879                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3880                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3881                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3882                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3883                         </actions>
3884                 </permacrud>
3885         </class>
3886         
3887         <class id="bram" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_map" oils_persist:tablename="booking.resource_attr_map" reporter:label="Resource Attribute Map">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3889                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3890                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3891                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3892                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3893                 </fields>
3894                 <links>
3895                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3896                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3897                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3898                 </links>
3899                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3900                         <actions>
3901                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3902                     <context link="resource" field="owner" />
3903                 </create>
3904                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3905                     <context link="resource" field="owner" />
3906                 </retrieve>
3907                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3908                     <context link="resource" field="owner" />
3909                 </update>
3910                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3911                     <context link="resource" field="owner" />
3912                 </delete>
3913                         </actions>
3914                 </permacrud>
3915         </class>
3916         
3917         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3918                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3919                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3920                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3921                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3922                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3923                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3924                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3925                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3926                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3927                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3928                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3929                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3930                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3931                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3932                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3933                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3934                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3935                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3936                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3937                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3938                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3939                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3940                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3941                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3942                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3943                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3944                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3945                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3946                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3947                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3948                 </fields>
3949                 <links>
3950                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3951                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3952                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3953                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3954                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3955                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3956                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3957                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3958                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3959                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3960                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3961                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3962                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3963                 </links>
3964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3965                         <actions>
3966                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3967                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3968                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3969                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3970                         </actions>
3971                 </permacrud>
3972         </class>
3973         
3974         <class id="bravm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation_attr_value_map" oils_persist:tablename="booking.reservation_attr_value_map" reporter:label="Reservation Attribute Value Map">
3975                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3976                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3977                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3978                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3979                 </fields>
3980                 <links>
3981                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3982                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3983                 </links>
3984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3985                         <actions>
3986                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3987                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3988                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3989                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3990                         </actions>
3991                 </permacrud>
3992         </class>
3993
3994         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
3995                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3996                         <field name="bucket" reporter:datatype="link"/>
3997                         <field name="id" reporter:datatype="id" />
3998                         <field name="target_call_number" reporter:datatype="link" />
3999                         <field name="create_time" reporter:datatype="timestamp" />
4000                         <field name="pos" reporter:datatype="int" />
4001                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4002                 </fields>
4003                 <links>
4004                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4005                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4006             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4007                 </links>
4008         </class>
4009         <class id="ccnbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item_note" oils_persist:tablename="container.call_number_bucket_item_note" reporter:label="Call Number Bucket Item Note">
4010                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4011                         <field name="id" reporter:datatype="id" />
4012                         <field name="item" reporter:datatype="link"/>
4013                         <field name="note" reporter:datatype="text" />
4014                 </fields>
4015                 <links>
4016                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4017                 </links>
4018         </class>
4019         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
4020                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4021                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4022                         <field name="btype" reporter:datatype="text"/>
4023                         <field name="id" reporter:datatype="id" />
4024                         <field name="name" reporter:datatype="text"/>
4025                         <field name="description" reporter:datatype="text"/>
4026                         <field name="owner" reporter:datatype="link"/>
4027                         <field name="pub" reporter:datatype="bool"/>
4028                         <field name="create_time" reporter:datatype="timestamp" />
4029                 </fields>
4030                 <links>
4031                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4032                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4033                 </links>
4034         </class>
4035         <class id="cbrebn" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_note" oils_persist:tablename="container.biblio_record_entry_bucket_note" reporter:label="Bibliographic Record Entry Bucket Note">
4036                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4037                         <field name="id" reporter:datatype="id" />
4038                         <field name="bucket" reporter:datatype="link"/>
4039                         <field name="note" reporter:datatype="text" />
4040                 </fields>
4041                 <links>
4042                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4043                 </links>
4044         </class>
4045         <class id="ahcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_copy_map" oils_persist:tablename="action.hold_copy_map" reporter:label="Hold Copy Map">
4046                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4047                         <field name="hold" reporter:datatype="link"/>
4048                         <field name="id" reporter:datatype="id" />
4049                         <field name="target_copy" reporter:datatype="link"/>
4050                 </fields>
4051                 <links>
4052                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4053                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4054                 </links>
4055         </class>
4056         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4057                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4058                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4059                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4060                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4061                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4062                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4063                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4064                 </fields>
4065                 <links>
4066                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4067                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4068                 </links>
4069         </class>
4070         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location">
4071                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4072                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4073                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4074                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4075                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4076                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4077                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4078                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4079                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4080                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4081                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4082                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4083                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4084                 </fields>
4085                 <links>
4086                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4087                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4088                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4089                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4090                 </links>
4091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4092             <actions>
4093                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4094                 <retrieve/>
4095                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4096                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4097             </actions>
4098         </permacrud>
4099         </class>
4100         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
4101                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4102                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4103                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4104                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4105                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4106             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4107             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4108             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4109                 </fields>
4110                 <links>
4111                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4112                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4113                 </links>
4114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4115             <actions>
4116                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4117                 <retrieve/>
4118                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4119                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4120             </actions>
4121         </permacrud>
4122         </class>
4123         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
4124                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4125                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4126             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4127             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4128                 </fields>
4129                 <links>
4130                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4131                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4132                 </links>
4133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4134             <actions>
4135                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4136                                         <context link="lgroup" field="owner" />
4137                 </create>
4138                 <retrieve/>
4139                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4140                                         <context link="lgroup" field="owner" />
4141                 </update>
4142                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4143                                         <context link="lgroup" field="owner" />
4144                 </delete>
4145             </actions>
4146         </permacrud>
4147         </class>
4148
4149     <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
4150         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4151             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4152             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4153             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4154             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4155         </fields>
4156         <links>
4157             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4158             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4159         </links>
4160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4161             <actions>
4162                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4163                 <retrieve/>
4164                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4165                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4166             </actions>
4167         </permacrud>
4168     </class>
4169
4170         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4171                 <fields>
4172                         <field name="sre_id" oils_persist:virtual="true" />
4173                         <field name="location" oils_persist:virtual="true" />
4174                         <field name="owning_lib" oils_persist:virtual="true" />
4175                         <field name="basic_holdings" oils_persist:virtual="true" />
4176                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4177                         <field name="supplement_holdings" oils_persist:virtual="true" />
4178                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4179                         <field name="index_holdings" oils_persist:virtual="true" />
4180                         <field name="index_holdings_add" oils_persist:virtual="true" />
4181                         <field name="online" oils_persist:virtual="true" />
4182                         <field name="missing" oils_persist:virtual="true" />
4183                         <field name="incomplete" oils_persist:virtual="true" />
4184                 </fields>
4185         </class>
4186
4187         <class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">
4188                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4189                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4190                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4191                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4192                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4193                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4194                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4195                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4196                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4197                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4198                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4199                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4200                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4201                 </fields>
4202                 <links>
4203                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4204                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4205                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4206                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4207                 </links>
4208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4209                         <actions>
4210                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4211                                 <retrieve/>
4212                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4213                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4214                         </actions>
4215                 </permacrud>
4216         </class>
4217
4218         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
4219                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4220                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4221                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4222                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4223                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4224                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4225                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4226                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4227                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4228                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4229                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4230                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4231                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4232                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4233                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4234                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4235                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4236                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4237                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4238                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4239                 </fields>
4240                 <links>
4241                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4242                 </links>
4243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244                         <actions>
4245                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4246                                         <context link="subscription" field="owning_lib" />
4247                                 </create>
4248                                 <retrieve />
4249                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4250                                         <context link="subscription" field="owning_lib" />
4251                                 </update>
4252                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4253                                         <context link="subscription" field="owning_lib" />
4254                                 </delete>
4255                         </actions>
4256                 </permacrud>
4257         </class>
4258
4259         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4260                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4261                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4262                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4263                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4264                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4265                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4266                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4267                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4268                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4269                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4270                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4271                 </fields>
4272                 <links>
4273                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4274                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4275                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4276                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4277                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4278                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4279                 </links>
4280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4281                         <actions>
4282                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4283                                 <retrieve />
4284                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4285                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4286                         </actions>
4287                 </permacrud>
4288         </class>
4289
4290         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4291                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4292                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4293                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4294                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4295                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4296                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4297                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4298                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4299                 </fields>
4300                 <links>
4301                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4302                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4303                 </links>
4304         </class>
4305
4306         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4307                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4308                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4309                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4310                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4311                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4312                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4313                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4314                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4315                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4316                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4317                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4318                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4319                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4320                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4321                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4322                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4323                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4324                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4325                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4326                 </fields>
4327                 <links>
4328                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4329                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4330                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4331                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4332                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4333                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4334                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4335                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4336                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4337                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4338                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4339                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4340                 </links>
4341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4342                         <actions>
4343                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4344                                 <retrieve />
4345                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4346                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4347                         </actions>
4348                 </permacrud>
4349         </class>
4350
4351         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
4352                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4353                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4354                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4355                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4356                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4357                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4358                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4359                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4360                 </fields>
4361                 <links>
4362                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4363                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4364                 </links>
4365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4366                         <actions>
4367                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4368                                         <context link="distribution" field="holding_lib" />
4369                                 </create>
4370                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4371                                         <context link="distribution" field="holding_lib" />
4372                                 </retrieve>
4373                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4374                                         <context link="distribution" field="holding_lib" />
4375                                 </update>
4376                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4377                                         <context link="distribution" field="holding_lib" />
4378                                 </delete>
4379                         </actions>
4380                 </permacrud>
4381         </class>
4382
4383         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4384                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4385                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4386                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4387                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4388                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4389                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4390                 </fields>
4391                 <links>
4392                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4393                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4394                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4395                 </links>
4396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4397                         <actions>
4398                                 <create permission="ADMIN_SERIAL_STREAM">
4399                                         <context link="distribution" field="holding_lib" />
4400                                 </create>
4401                                 <retrieve />
4402                                 <update permission="ADMIN_SERIAL_STREAM">
4403                                         <context link="distribution" field="holding_lib" />
4404                                 </update>
4405                                 <delete permission="ADMIN_SERIAL_STREAM">
4406                                         <context link="distribution" field="holding_lib" />
4407                                 </delete>
4408                         </actions>
4409                 </permacrud>
4410         </class>
4411
4412         <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
4413                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4414                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4415                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4416                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4417                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4418                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4419                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4420                 </fields>
4421                 <links>
4422                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4423                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4424                 </links>
4425                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4426                         <actions>
4427                                 <create permission="ADMIN_SERIAL_STREAM">
4428                                         <context link="stream" jump="distribution" field="holding_lib" />
4429                                 </create>
4430                                 <retrieve permission="RECEIVE_SERIAL">
4431                                         <context link="stream" jump="distribution" field="holding_lib" />
4432                                 </retrieve>
4433                                 <update permission="ADMIN_SERIAL_STREAM">
4434                                         <context link="stream" jump="distribution" field="holding_lib" />
4435                                 </update>
4436                                 <delete permission="ADMIN_SERIAL_STREAM">
4437                                         <context link="stream" jump="distribution" field="holding_lib" />
4438                                 </delete>
4439                         </actions>
4440                 </permacrud>
4441         </class>
4442
4443         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4444                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4445                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4446                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4447                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4448                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4449                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4450                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4451                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4452                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4453                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4454                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4455                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4456                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4457                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4458                 </fields>
4459                 <links>
4460                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4461                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4462                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4463                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4464                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4465                 </links>
4466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4467                         <actions>
4468                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4469                                         <context link="subscription" field="owning_lib" />
4470                                 </create>
4471                                 <retrieve/>
4472                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4473                                         <context link="subscription" field="owning_lib" />
4474                                 </update>
4475                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4476                                         <context link="subscription" field="owning_lib" />
4477                                 </delete>
4478                         </actions>
4479                 </permacrud>
4480         </class>
4481
4482         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4483                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4484                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4485                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4486                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4487                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4488                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4489                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4490                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4491                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4492                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4493                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4494                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4495                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4496                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4497                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4498                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4499                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4500                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4501                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4502                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4503                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4504                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4505                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4506                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4507                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4508                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4509                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4510                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4511                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4512                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4513                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4514                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4515                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4516                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4517                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4518                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4519                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4520                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4521                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4522                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4523                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4524                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4525                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4526                 </fields>
4527                 <links>
4528                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4529                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4530                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4531                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4532                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4533                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4534                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4535                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4536                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4537                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4538                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4539                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4540                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4541                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4542                 </links>
4543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4544                         <actions>
4545                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4546                                 <retrieve/>
4547                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4548                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4549                         </actions>
4550                 </permacrud>
4551         </class>
4552
4553         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4554                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4555                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4556                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4557                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4558                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4559                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4560                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4561                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4562                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4563                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4564                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4565                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4566                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4567                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4568                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4569                 </fields>
4570                 <links>
4571                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4572                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4573                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4574                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4575                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4576                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4577                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4578                 </links>
4579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4580                         <actions>
4581                                 <create permission="ADMIN_SERIAL_ITEM">
4582                                         <context link="stream" jump="distribution" field="holding_lib" />
4583                                 </create>
4584                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4585                                         <context link="stream" jump="distribution" field="holding_lib" />
4586                                 </retrieve>
4587                                 <update permission="ADMIN_SERIAL_ITEM">
4588                                         <context link="stream" jump="distribution" field="holding_lib" />
4589                                 </update>
4590                                 <delete permission="ADMIN_SERIAL_ITEM">
4591                                         <context link="stream" jump="distribution" field="holding_lib" />
4592                                 </delete>
4593                         </actions>
4594                 </permacrud>
4595         </class>
4596
4597         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4598                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4599                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4600                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4601                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4602                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4603                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4604                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4605                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4606                 </fields>
4607                 <links>
4608                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4609                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4610                 </links>
4611                 <!-- Not available via PCRUD at this time -->
4612         </class>
4613         <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">
4614                 <fields>
4615                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4616                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4617                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4618                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4619                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4620                 </fields>
4621                 <links>
4622                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4623                 </links>
4624         </class>
4625         <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">
4626                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4627                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4628                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4629                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4630                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4631                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4632                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4633                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4634                 </fields>
4635                 <links>
4636                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4637                 </links>
4638         </class>
4639         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
4640                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4641                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4642                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4643                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4644                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4645                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4646                 </fields>
4647                 <links>
4648                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4649                 </links>
4650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4651                         <actions>
4652                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4653                                         <context link="distribution" field="holding_lib" />
4654                                 </create>
4655                                 <retrieve/>
4656                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4657                                         <context link="distribution" field="holding_lib" />
4658                                 </update>
4659                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4660                                         <context link="distribution" field="holding_lib" />
4661                                 </delete>
4662                         </actions>
4663                 </permacrud>
4664         </class>
4665
4666         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
4667                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4668                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4669                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4670                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4671                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4672                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4673                 </fields>
4674                 <links>
4675                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4676                 </links>
4677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4678                         <actions>
4679                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4680                                         <context link="distribution" field="holding_lib" />
4681                                 </create>
4682                                 <retrieve/>
4683                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4684                                         <context link="distribution" field="holding_lib" />
4685                                 </update>
4686                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4687                                         <context link="distribution" field="holding_lib" />
4688                                 </delete>
4689                         </actions>
4690                 </permacrud>
4691         </class>
4692
4693         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
4694                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4695                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4696                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4697                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4698                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4699                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4700                 </fields>
4701                 <links>
4702                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4703                 </links>
4704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4705                         <actions>
4706                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4707                                         <context link="distribution" field="holding_lib" />
4708                                 </create>
4709                                 <retrieve/>
4710                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4711                                         <context link="distribution" field="holding_lib" />
4712                                 </update>
4713                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4714                                         <context link="distribution" field="holding_lib" />
4715                                 </delete>
4716                         </actions>
4717                 </permacrud>
4718         </class>
4719
4720         <class id="ascecm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
4721                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4722                         <field name="id" reporter:datatype="id" />
4723                         <field name="owning_copy" reporter:datatype="link"/>
4724                         <field name="stat_cat" reporter:datatype="link"/>
4725                         <field name="stat_cat_entry" reporter:datatype="link"/>
4726                 </fields>
4727                 <links>
4728                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4729                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4730                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4731                 </links>
4732         </class>
4733         <class id="citm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_type_map" oils_persist:tablename="config.item_type_map" reporter:label="Item Type Map" oils_persist:field_safe="true">
4734                 <fields oils_persist:primary="code">
4735                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4736                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4737                 </fields>
4738                 <links/>
4739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4740             <actions>
4741                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4742                 <retrieve/>
4743                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4744                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4745             </actions>
4746         </permacrud>
4747         </class>
4748         <class id="cblvl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map" oils_persist:field_safe="true">
4749                 <fields oils_persist:primary="code">
4750                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4751                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4752                 </fields>
4753                 <links/>
4754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4755             <actions>
4756                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4757                 <retrieve/>
4758                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4759                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4760             </actions>
4761         </permacrud>
4762         </class>
4763         <class id="sra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="search::relevance_adjustment" oils_persist:tablename="search.relevance_adjustment" reporter:label="Relevance Adjustment">
4764                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4765                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4766                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4767                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4768                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4769                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4770                 </fields>
4771                 <links>
4772             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4773         </links>
4774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4775             <actions>
4776                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4777                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4778                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4779                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4780             </actions>
4781         </permacrud>
4782         </class>
4783         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
4784                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4785                         <field name="id" reporter:datatype="id" />
4786                         <field name="name" reporter:datatype="text"/>
4787                 </fields>
4788                 <links/>
4789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4790             <actions>
4791                 <create permission="CREATE_LASSO" global_required="true"/>
4792                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4793                 <update permission="UPDATE_LASSO" global_required="true"/>
4794                 <delete permission="DELETE_LASSO" global_required="true"/>
4795             </actions>
4796         </permacrud>
4797         </class>
4798         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
4799                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4800                         <field name="id" reporter:datatype="id" />
4801                         <field name="lasso" reporter:datatype="link"/>
4802                         <field name="org_unit" reporter:datatype="org_unit"/>
4803                 </fields>
4804                 <links>
4805                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4806                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4807                 </links>
4808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4809             <actions>
4810                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4811                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4812                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4813                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4814             </actions>
4815         </permacrud>
4816         </class>
4817         <class id="aoup" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity" reporter:label="Org Unit Proximity">
4818                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4819                         <field name="id" reporter:datatype="id" />
4820                         <field name="from_org" reporter:datatype="org_unit"/>
4821                         <field name="to_org" reporter:datatype="org_unit"/>
4822                         <field name="prox" reporter:datatype="int" />
4823                 </fields>
4824                 <links>
4825                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4826                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4827                 </links>
4828         </class>
4829         <class id="ssr" controller="open-ils.cstore" oils_obj:fieldmapper="search::search_result" oils_persist:tablename="search.search_result" oils_persist:readonly="true" reporter:label="Search Result">
4830                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4831                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4832                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4833                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4834                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4835                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4836                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4837                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4838                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4839                 </fields>
4840                 <links/>
4841         </class>
4842         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4843                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4844                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4845                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4846                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4847                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4848                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4849                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4850                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4851                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4852                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4853                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4854                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4855                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4856                 </fields>
4857                 <links>
4858                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4859                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4860                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4861                 </links>
4862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4863             <actions>
4864                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4865                 <retrieve/>
4866                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4867                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4868             </actions>
4869         </permacrud>
4870         </class>
4871         <class id="aoa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_address" oils_persist:tablename="actor.org_address" reporter:label="Org Address">
4872                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4873                         <field name="address_type"  reporter:datatype="text"/>
4874                         <field name="city"  reporter:datatype="text"/>
4875                         <field name="country"  reporter:datatype="text"/>
4876                         <field name="county"  reporter:datatype="text"/>
4877                         <field name="id" reporter:datatype="id" />
4878                         <field name="org_unit" reporter:datatype="org_unit"/>
4879                         <field name="post_code"  reporter:datatype="text"/>
4880                         <field name="state"  reporter:datatype="text"/>
4881                         <field name="street1"  reporter:datatype="text"/>
4882                         <field name="street2"  reporter:datatype="text"/>
4883                         <field name="valid" reporter:datatype="bool"/>
4884                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4885                 </fields>
4886                 <links>
4887                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4888                 </links>
4889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4890             <actions>
4891                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4892                 <retrieve/>
4893                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4894                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4895             </actions>
4896         </permacrud>
4897         </class>
4898         <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">
4899                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
4900                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4901                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4902                         <field name="query_text" reporter:datatype="text"/>
4903                 </fields>
4904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4905             <actions>
4906                 <retrieve/>
4907             </actions>
4908         </permacrud>
4909         </class>
4910
4911         <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">
4912                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
4913                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4914                         <field name="owner" reporter:datatype="org_unit"/>
4915                         <field name="code" reporter:datatype="text"/>
4916                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4917                         <field name="create_date" reporter:datatype="timestamp"/>
4918                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4919                 </fields>
4920                 <links>
4921                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4922                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
4923                 </links>
4924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4925             <actions>
4926                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4927                 <retrieve/>
4928                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4929                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4930             </actions>
4931         </permacrud>
4932         </class>
4933         <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">
4934                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
4935                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4936                         <field name="grp" reporter:datatype="link"/>
4937                         <field name="pos" reporter:datatype="int"/>
4938                         <field name="query" reporter:datatype="link"/>
4939                 </fields>
4940                 <links>
4941                         <link field="grp" reltype="has_a" key="id" map="" class="asfge"/>
4942                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
4943                 </links>
4944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4945             <actions>
4946                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
4947                     <context link="grp" field="owner"/>
4948                 </create>
4949                 <retrieve/>
4950                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
4951                     <context link="grp" field="owner"/>
4952                 </update>
4953                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
4954                     <context link="grp" field="owner"/>
4955                 </delete>
4956             </actions>
4957         </permacrud>
4958         </class>
4959
4960         <!-- A note: Please update alhr and ahopl when updating ahr -->
4961         <class id="ahr" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
4962                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4963                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4964                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4965                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4966                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4967                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4968                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4969                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4970                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4971                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4972                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4973                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4974                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4975                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4976                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4977                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
4978                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4979                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4980                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4981                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4982                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4983                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4984                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4985                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4986                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4987                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4988                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4989                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4990                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4991                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4992                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4993                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4994                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4995                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4996                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4997                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4998                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4999                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5000                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5001                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5002                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5003                 </fields>
5004                 <links>
5005                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5006                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5007                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5008                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5009                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5010                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5011                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5012                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5013                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5014                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5015                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5016                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5017                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5018                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5019                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5020                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5021                 </links>
5022         </class>
5023         <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
5024                 <oils_persist:source_definition><![CDATA[
5025                 SELECT
5026                         ahr.*,
5027                         COALESCE(acplo.position, 999) AS
5028                                 copy_location_order_position,
5029                         CASE WHEN au.alias IS NOT NULL THEN
5030                                 au.alias
5031                         ELSE
5032                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5033                                         COALESCE(au.family_name, ''),
5034                                         COALESCE(au.suffix, ''),
5035                                         ', ',
5036                                         COALESCE(au.prefix, ''),
5037                                         COALESCE(au.first_given_name, ''),
5038                                         COALESCE(au.second_given_name, '')
5039                                 ], ' '), E'\\s+,', ',')
5040                         END AS usr_display_name,
5041                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5042                                 AS call_number_label,
5043                         siss.label AS issuance_label,
5044                         (ahr.usr <> ahr.requestor) AS is_staff_hold
5045                 FROM action.hold_request ahr
5046                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5047                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5048                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5049                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5050                 JOIN actor.usr au ON (au.id = ahr.usr)
5051                 LEFT JOIN serial.issuance siss
5052                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5053                 LEFT JOIN asset.copy_location_order acplo
5054                         ON (acp.location = acplo.location AND
5055                                 acp.circ_lib = acplo.org)
5056                 WHERE
5057                         ahr.capture_time IS NULL AND
5058                         ahr.cancel_time IS NULL AND
5059                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5060                 ]]></oils_persist:source_definition>
5061                 <fields oils_persist:primary="id">
5062                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5063                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5064                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5065                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5066                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5067                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5068                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5069                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5070                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5071                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5072                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5073                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5074                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5075                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5076                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5077                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5078                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5079                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5080                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5081                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5082                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5083                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5084                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5085                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5086                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5087                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5088                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5089                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5090                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5091                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5092                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5093                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5094                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5095                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5096                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5097                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5098                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5099                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5100                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5101                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5102                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5103                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5104                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5105                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5106                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5107                 </fields>
5108                 <links>
5109                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5110                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5111                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5112                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5113                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5114                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5115                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5116                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5117                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5118                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5119                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5120                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5121                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5122                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5123                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5124                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5125                 </links>
5126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5127                         <actions>
5128                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5129                         </actions>
5130                 </permacrud>
5131         </class>
5132         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5133                 <oils_persist:source_definition>
5134                         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)
5135                 </oils_persist:source_definition>
5136                 <fields oils_persist:primary="id">
5137                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5138                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5139                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5140                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5141                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5142                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5144                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5145                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5146                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5147                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5148                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5149                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5150                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5151                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5152                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5153                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5154                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5155                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5156                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5157                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5158                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5159                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5161                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5162                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5163                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5164                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5165                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5166                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5168                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5169                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5170                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5171                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5172                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5174                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5175                 </fields>
5176                 <links>
5177                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5178                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5179                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5180                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5181                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5182                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5183                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5184                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5185                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5186                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5187                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5188                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5189                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5190                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5191                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5192                 </links>
5193         </class>
5194
5195         <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">
5196                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5197                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5198                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5199                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5200                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5201                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5202                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5203                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5204                 </fields>
5205                 <links>
5206                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5207                 </links>
5208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5209                         <actions>
5210                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5211                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5212                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5213                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5214                         </actions>
5215                 </permacrud>
5216         </class>
5217         <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">
5218                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5219                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5220                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5221                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5222                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5223                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5224                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5225                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5226                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5227                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5228                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5229                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5230                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5231                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5232                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5233                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5234                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5235                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5236                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5237                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5238                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5239                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5240                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5241                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5242                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5243                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5244                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5245                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5246                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5247                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5248                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5249                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5250                 </fields>
5251                 <links>
5252                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5253                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5254                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5255                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5256                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5257                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5258                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5259                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5260                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5261                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5262                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5263                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5264                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5265                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5266                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5267                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5268                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5269                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5270                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5271                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5272                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5273                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5274                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5275                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5276                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5277                 </links>
5278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5279             <actions>
5280                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5281                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
5282                     <context field="id"/>
5283                     <context field="parent_ou"/>
5284                                 </retrieve>
5285                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5286                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5287             </actions>
5288         </permacrud>
5289         </class>
5290         <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">
5291                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5292                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5293                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5294                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5295                 </fields>
5296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5297                         <actions>
5298                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5299                                 <retrieve/>
5300                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5301                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5302                         </actions>
5303                 </permacrud>
5304         </class>
5305         <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">
5306                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5307                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5308                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5309                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5310                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5311                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5312                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5313                 </fields>
5314                 <links>
5315                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5316                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5317                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5318                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5319                 </links>
5320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5321                         <actions>
5322                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5323                                 <retrieve/>
5324                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5325                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5326                         </actions>
5327                 </permacrud>
5328         </class>
5329         <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">
5330                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5331                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5332                         <field name="btype" reporter:datatype="text"/>
5333                         <field name="id" reporter:datatype="id" />
5334                         <field name="name"  reporter:datatype="text"/>
5335                         <field name="description" reporter:datatype="text"/>
5336                         <field name="owner" reporter:datatype="link"/>
5337                         <field name="pub" reporter:datatype="bool"/>
5338                         <field name="create_time" reporter:datatype="timestamp" />
5339                 </fields>
5340                 <links>
5341                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5342                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5343                 </links>
5344         </class>
5345         <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">
5346                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5347                         <field name="id" reporter:datatype="id" />
5348                         <field name="bucket" reporter:datatype="link"/>
5349                         <field name="note" reporter:datatype="text" />
5350                 </fields>
5351                 <links>
5352                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5353                 </links>
5354         </class>
5355         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5356                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5357                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5358                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5359                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5360                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5361                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5362                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5363                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5364                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5365                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5366                 </fields>
5367                 <links>
5368                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5369                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5370                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5371                 </links>
5372         </class>
5373         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5374                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5375                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5376                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5377                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5378                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5379                 </fields>
5380                 <links>
5381                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5382                 </links>
5383                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5384                         <actions>
5385                                 <retrieve permission="VIEW_USER">
5386                                         <context link="usr" field="home_ou" />
5387                                 </retrieve>
5388                         </actions>
5389                 </permacrud>
5390         </class>
5391     <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">
5392         <fields oils_persist:primary="field">
5393             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5394             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5395             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5396         </fields>
5397         <links/>
5398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5399             <actions>
5400                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5401                 <retrieve />
5402                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5403                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5404             </actions>
5405         </permacrud>
5406     </class>
5407         <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">
5408                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5409                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5410                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5411                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5412                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5413                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5414                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5415                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5416                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5417                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5418                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5419                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5420                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5421                 </fields>
5422                 <links>
5423                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5424                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5425                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5426                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5427                 </links>
5428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5429             <actions>
5430                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5431                 <retrieve />
5432                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5433                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5434             </actions>
5435         </permacrud>
5436         </class>
5437         <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">
5438                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5439                         <field name="field" reporter:datatype="link"/>
5440                         <field name="id" reporter:datatype="id" />
5441                         <field name="source" reporter:datatype="link"/>
5442                         <field name="value"  reporter:datatype="text"/>
5443                 </fields>
5444                 <links>
5445                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5446                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5447                 </links>
5448         </class>
5449         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5450                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5451                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5452                         <field name="btype" reporter:datatype="text"/>
5453                         <field name="id" reporter:datatype="id" />
5454                         <field name="name"  reporter:datatype="text"/>
5455                         <field name="description" reporter:datatype="text"/>
5456                         <field name="owner" reporter:datatype="link"/>
5457                         <field name="pub" reporter:datatype="bool"/>
5458                         <field name="create_time" reporter:datatype="timestamp" />
5459                 </fields>
5460                 <links>
5461                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5462                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5463                 </links>
5464         </class>
5465         <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">
5466                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5467                         <field name="id" reporter:datatype="id" />
5468                         <field name="bucket" reporter:datatype="link"/>
5469                         <field name="note" reporter:datatype="text" />
5470                 </fields>
5471                 <links>
5472                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5473                 </links>
5474         </class>
5475         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5476                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5477                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5478                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5479                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5480                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5481                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5482                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5483                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5484                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5485                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5486                 </fields>
5487                 <links>
5488                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5489                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5490                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5491                 </links>
5492         </class>
5493         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5494                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5495                         <field name="id" reporter:datatype="id" />
5496                         <field name="ind1" />
5497                         <field name="ind2" />
5498                         <field name="record" />
5499                         <field name="subfield" />
5500                         <field name="tag" />
5501                         <field name="value" />
5502                 </fields>
5503                 <links>
5504                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5505                 </links>
5506         </class>
5507         <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">
5508                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5509                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5510                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5511                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5512                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5513                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5514                 </fields>
5515                 <links>
5516                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5517                 </links>
5518         </class>
5519         <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">
5520                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5521                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5522                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5523                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5524                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5525                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5526                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5527                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5528                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5529                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5530                 </fields>
5531                 <links>
5532                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5533                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5534                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5535                 </links>
5536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5537             <actions>
5538                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5539                 <retrieve/>
5540                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5541                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5542             </actions>
5543         </permacrud>
5544         </class>
5545         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5546                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5547                         <field name="create_date" reporter:datatype="timestamp"/>
5548                         <field name="creator" reporter:datatype="link"/>
5549                         <field name="edit_date" reporter:datatype="timestamp"/>
5550                         <field name="editor" reporter:datatype="link"/>
5551                         <field name="id" reporter:datatype="id" />
5552                         <field name="pub" reporter:datatype="bool"/>
5553                         <field name="record" reporter:datatype="link"/>
5554                         <field name="value"  reporter:datatype="text"/>
5555                 </fields>
5556                 <links>
5557                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5558                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5559                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5560                 </links>
5561         </class>
5562         <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">
5563                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5564                         <field name="balance_owed" reporter:datatype="money" />
5565                         <field name="total_owed" reporter:datatype="money" />
5566                         <field name="total_paid" reporter:datatype="money" />
5567                         <field name="usr" reporter:datatype="link"/>
5568                 </fields>
5569                 <links>
5570                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5571                 </links>
5572         </class>
5573         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5574                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5575                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5576                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5577                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5578                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5579                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5580                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5581                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5582                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5583                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5584                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5585                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5586                 </fields>
5587                 <links>
5588                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5589                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5590                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5591                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5592                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5593                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5594                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5595                 </links>
5596         </class>
5597         <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">
5598                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5599                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5600                         <field name="quality" reporter:datatype="int" />
5601                         <field name="source" reporter:datatype="text"/>
5602                         <field name="transcendant" reporter:datatype="bool"/>
5603                         <field name="can_have_copies" reporter:datatype="bool"/>
5604                 </fields>
5605                 <links/>
5606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5607             <actions>
5608                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5609                 <retrieve/>
5610                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5611                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5612             </actions>
5613         </permacrud>
5614         </class>
5615         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5616                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5617                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5618                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5619                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5620                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5621                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5622                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5623                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5624                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5625                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5626                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5627                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5628                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5629                 </fields>
5630                 <links>
5631                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5632                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5634                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5635                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5636                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5637                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5638                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5639                 </links>
5640         </class>
5641         <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">
5642                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5643                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5644                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5645                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5646                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5647                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5648                 </fields>
5649                 <links>
5650                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5651                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5652                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5653                 </links>
5654         </class>
5655         <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">
5656                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5657                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5658                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5659                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5660                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5661                 </fields>
5662                 <links>
5663                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5664                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5665                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5666                 </links>
5667         </class>
5668         <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">
5669                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5670                         <field name="bucket" reporter:datatype="link"/>
5671                         <field name="id" reporter:datatype="id" />
5672                         <field name="target_user" reporter:datatype="link"/>
5673                         <field name="create_time" reporter:datatype="timestamp" />
5674                         <field name="pos" reporter:datatype="int" />
5675                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5676                 </fields>
5677                 <links>
5678                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5679                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5680             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5681                 </links>
5682         </class>
5683         <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">
5684                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5685                         <field name="id" reporter:datatype="id" />
5686                         <field name="item" reporter:datatype="link"/>
5687                         <field name="note" reporter:datatype="text" />
5688                 </fields>
5689                 <links>
5690                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5691                 </links>
5692         </class>
5693         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5694                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5695                         <field name="balance_owed" reporter:datatype="money" />
5696                         <field name="total_owed" reporter:datatype="money" />
5697                         <field name="total_paid" reporter:datatype="money" />
5698                         <field name="usr" reporter:datatype="link"/>
5699                 </fields>
5700                 <links>
5701                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5702                 </links>
5703         </class>
5704         <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">
5705                 <fields oils_persist:primary="code" oils_persist:sequence="">
5706                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5707                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5708                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5709                 </fields>
5710                 <links/>
5711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5712             <actions>
5713                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5714                 <retrieve/>
5715                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5716                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5717             </actions>
5718         </permacrud>
5719         </class>
5720         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5721                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5722                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5723                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5724                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5725                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5726                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5727                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5728                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5729                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5730                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5731                 </fields>
5732                 <links>
5733                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5734                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5735                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5736                 </links>
5737         </class>
5738         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5739                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5740                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5741                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5742                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5743                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5744                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5745                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5746                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5747                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5748                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5749                 </fields>
5750                 <links>
5751                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5752                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5753                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5754                 </links>
5755         </class>
5756         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5757                 <fields oils_persist:primary="id" oils_persist:sequence="">
5758                         <field name="checkin_lib" reporter:datatype="link"/>
5759                         <field name="checkin_staff" reporter:datatype="link"/>
5760                         <field name="checkin_time" reporter:datatype="timestamp"/>
5761                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5762                         <field name="circ_staff" reporter:datatype="link"/>
5763                         <field name="desk_renewal" reporter:datatype="bool"/>
5764                         <field name="due_date" reporter:datatype="timestamp"/>
5765                         <field name="duration" reporter:datatype="interval"/>
5766                         <field name="duration_rule" reporter:datatype="link"/>
5767                         <field name="fine_interval" reporter:datatype="interval"/>
5768                         <field name="id" reporter:datatype="id" />
5769                         <field name="max_fine" reporter:datatype="money" />
5770                         <field name="max_fine_rule" reporter:datatype="link"/>
5771                         <field name="opac_renewal" reporter:datatype="bool"/>
5772                         <field name="phone_renewal" reporter:datatype="bool"/>
5773                         <field name="recurring_fine" reporter:datatype="money" />
5774                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5775                         <field name="renewal_remaining" reporter:datatype="int" />
5776             <field name="grace_period" reporter:datatype="interval" />
5777                         <field name="stop_fines" reporter:datatype="text"/>
5778                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5779                         <field name="target_copy" reporter:datatype="link"/>
5780                         <field name="usr" reporter:datatype="link"/>
5781                         <field name="xact_finish" reporter:datatype="timestamp" />
5782                         <field name="xact_start" reporter:datatype="timestamp" />
5783                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5784                 </fields>
5785                 <links>
5786                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5787                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5788                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5789                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5790                 </links>
5791         </class>
5792         <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">
5793                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5794                         <field name="field" reporter:datatype="link"/>
5795                         <field name="id" reporter:datatype="id" />
5796                         <field name="source" reporter:datatype="link"/>
5797                         <field name="value" reporter:datatype="text"/>
5798                 </fields>
5799                 <links>
5800                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5801                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5802                 </links>
5803         </class>
5804         <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">
5805                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5806                         <field name="high" reporter:datatype="money" />
5807                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5808                         <field name="low" reporter:datatype="money" />
5809                         <field name="name" reporter:datatype="text"/>
5810                         <field name="normal" reporter:datatype="money" />
5811                         <field name="recurrence_interval" reporter:datatype="interval"/>
5812             <field name="grace_period" reporter:datatype="interval" />
5813                 </fields>
5814                 <links/>
5815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5816             <actions>
5817                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5818                 <retrieve/>
5819                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5820                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5821             </actions>
5822         </permacrud>
5823         </class>
5824         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5825                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5826                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5827                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5828                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5829                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5830                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5831                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5832                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5833                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5834                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5835                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5836                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5837                 </fields>
5838                 <links>
5839                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5840                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5841                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5842                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5843                 </links>
5844         </class>
5845         <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">
5846                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5847                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5848                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5849                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5850                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5851                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5852                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5853                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5854                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5855                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5856                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5857                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5858                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5859                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5860                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5861                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5862                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5863                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5864                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5865                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5866                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5867                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5868                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5869                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5870                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5871                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5872                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5873                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5874                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5875                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5876                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5877                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5878                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5879                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5880                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5881                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5882                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5883                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5884                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5885                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5886                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5887                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5888                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5889                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5890                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5891                 </fields>
5892                 <links>
5893                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5894                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5895                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5896                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5897                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5898                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5899                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5900                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5901                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5902                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5903                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5904                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5905                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5906                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5907                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5908                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5909                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5910                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5911                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5912                 </links>
5913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5914             <actions>
5915                 <create permission="CREATE_COPY">
5916                     <context link="call_number" field="owning_lib"/>
5917                 </create>
5918                 <retrieve/>
5919                 <update permission="UPDATE_COPY">
5920                     <context link="call_number" field="owning_lib"/>
5921                 </update>
5922                 <delete permission="DELETE_COPY">
5923                     <context link="call_number" field="owning_lib"/>
5924                 </delete>
5925             </actions>
5926         </permacrud>
5927         </class>
5928
5929         <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">
5930                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5931                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5932                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5933                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5934                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5935                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5936                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5937                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5938                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5939                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5940                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5941                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5942                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5943                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5944                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5945                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5946                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5947                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5948                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5949                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5950                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5951                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5952                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5953                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5954                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5955                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5956                 </fields>
5957                 <links>
5958                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5959                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5960                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5961                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5962                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5963                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5964                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5965                 </links>
5966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5967                         <actions>
5968                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5969                                 <retrieve />
5970                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5971                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5972                         </actions>
5973                 </permacrud>
5974         </class>
5975
5976         <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">
5977                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5978                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5979                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5980                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5981                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5982                 </fields>
5983                 <links/>
5984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5985             <actions>
5986                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5987                 <retrieve/>
5988                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5989                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5990             </actions>
5991         </permacrud>
5992         </class>
5993         <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">
5994                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5995                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5996                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5997                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5998                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5999                 </fields>
6000                 <links/>
6001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6002             <actions>
6003                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6004                 <retrieve/>
6005                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6006                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6007             </actions>
6008         </permacrud>
6009         </class>
6010         <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">
6011                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6012                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6013                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6014                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6015                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6016                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6017                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6018                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6019                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6020                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6021                 </fields>
6022                 <links>
6023                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6024                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6025                 </links>
6026         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6027             <actions>
6028                 <create permission="CREATE_PERM" global_required="true"/>
6029                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6030                 <update permission="UPDATE_PERM" global_required="true"/>
6031                 <delete permission="DELETE_PERM" global_required="true"/>
6032             </actions>
6033         </permacrud>
6034         </class>
6035         <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">
6036                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6037                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6038                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6039                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6040                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6041                 </fields>
6042                 <links>
6043                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6044                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6045                 </links>
6046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6047             <actions>
6048                 <create permission="ADMIN_SURVEY">
6049                     <context link="question" jump="survey" field="owner"/>
6050                 </create>
6051                 <retrieve/>
6052                 <update permission="ADMIN_SURVEY">
6053                     <context link="question" jump="survey" field="owner"/>
6054                 </update>
6055                 <delete permission="ADMIN_SURVEY">
6056                     <context link="question" jump="survey" field="owner"/>
6057                 </delete>
6058             </actions>
6059         </permacrud>
6060         </class>
6061         <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">
6062                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6063                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6064                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6065                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6066                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6067                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6068                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6069                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6070                 </fields>
6071                 <links>
6072                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6073                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6074                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6075                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6076                 </links>
6077         </class>
6078         <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">
6079                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6080                         <field name="balance_owed" reporter:datatype="money" />
6081                         <field name="total_owed" reporter:datatype="money" />
6082                         <field name="total_paid" reporter:datatype="money" />
6083                         <field name="usr" reporter:datatype="link"/>
6084                 </fields>
6085                 <links>
6086                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6087                 </links>
6088         </class>
6089         <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">
6090                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6091                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6092                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6093                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6094                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6095                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6096                 </fields>
6097                 <links>
6098                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6099                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6100                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6101                 </links>
6102         </class>
6103         <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">
6104                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6105                         <field name="field" reporter:datatype="link"/>
6106                         <field name="id" reporter:datatype="id" />
6107                         <field name="source" reporter:datatype="link"/>
6108                         <field name="value" reporter:datatype="text"/>
6109                 </fields>
6110                 <links>
6111                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6112                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6113                 </links>
6114         </class>
6115         <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">
6116                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6117                         <field name="field" reporter:datatype="link"/>
6118                         <field name="id" reporter:datatype="id" />
6119                         <field name="source" reporter:datatype="link"/>
6120                         <field name="value" reporter:datatype="text"/>
6121                 </fields>
6122                 <links>
6123                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6124                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6125                 </links>
6126         </class>
6127         <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">
6128                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6129                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6130                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6131                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6132                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6133                 </fields>
6134                 <links>
6135                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6136                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6137                 </links>
6138         </class>
6139         <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">
6140                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6141                         <field name="depth" reporter:datatype="int" />
6142                         <field name="grantable" reporter:datatype="bool"/>
6143                         <field name="grp" reporter:datatype="link"/>
6144                         <field name="id" reporter:datatype="id" />
6145                         <field name="perm" reporter:datatype="link"/>
6146                 </fields>
6147                 <links>
6148                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6149                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6150                 </links>
6151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6152             <actions>
6153                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6154                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6155                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6156                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6157             </actions>
6158         </permacrud>
6159         </class>
6160         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6161                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6162                         <field name="items" oils_persist:virtual="true" />
6163                         <field name="btype" reporter:datatype="text"/>
6164                         <field name="id" reporter:datatype="id" />
6165                         <field name="name" reporter:datatype="text"/>
6166                         <field name="description" reporter:datatype="text"/>
6167                         <field name="owner" reporter:datatype="link"/>
6168                         <field name="pub" reporter:datatype="bool"/>
6169                         <field name="create_time" reporter:datatype="timestamp" />
6170                 </fields>
6171                 <links>
6172                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6173                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6174                 </links>
6175         </class>
6176         <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">
6177                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6178                         <field name="id" reporter:datatype="id" />
6179                         <field name="bucket" reporter:datatype="link"/>
6180                         <field name="note" reporter:datatype="text" />
6181                 </fields>
6182                 <links>
6183                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6184                 </links>
6185         </class>
6186         <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">
6187                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6188                         <field name="id" reporter:datatype="int" />
6189                         <field name="usr" reporter:datatype="link"/>
6190                         <field name="work_ou" reporter:datatype="link"/>
6191                 </fields>
6192                 <links>
6193                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6194                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6195                 </links>
6196         </class>
6197         <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">
6198                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6199                         <field name="depth" reporter:datatype="int"/>
6200                         <field name="grantable" reporter:datatype="bool"/>
6201                         <field name="id" reporter:datatype="id" />
6202                         <field name="perm" reporter:datatype="link"/>
6203                         <field name="usr" reporter:datatype="link"/>
6204                 </fields>
6205                 <links>
6206                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6207                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6208                 </links>
6209         </class>
6210         <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">
6211                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6212                         <field name="object_id" reporter:datatype="text"/>
6213                         <field name="grantable" reporter:datatype="bool"/>
6214                         <field name="id" reporter:datatype="id" />
6215                         <field name="perm" reporter:datatype="link"/>
6216                         <field name="usr" reporter:datatype="link"/>
6217                         <field name="object_type" reporter:datatype="text"/>
6218                 </fields>
6219                 <links>
6220                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6221                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6222                 </links>
6223         </class>
6224         <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">
6225                 <fields oils_persist:primary="id" oils_persist:sequence="">
6226                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6227                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6228                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6229                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6230                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6231                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6232                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6233                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6234                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6235                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6236                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6237                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6238                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6239                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6240                 </fields>
6241                 <links>
6242                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6243                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6244                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6245                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6246                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6247                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6248                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6249                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6250                 </links>
6251         </class>
6252         <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">
6253                 <fields oils_persist:primary="id" oils_persist:sequence="">
6254                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6255                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6256                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6257                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6258                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6259                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6260                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6261                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6262                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6263                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6264                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6265                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6266                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6267                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6268                 </fields>
6269                 <links>
6270                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6271                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6272                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6273                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6274                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6275                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6276                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6277                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6278                 </links>
6279         </class>
6280         <class id="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">
6281                 <fields oils_persist:primary="id" oils_persist:sequence="">
6282                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6283                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6284                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6285                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6286                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6287                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6288                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6289                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6290                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6291                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6292                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6293                 </fields>
6294                 <links>
6295                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6296                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6297                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6298                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6299                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6300                 </links>
6301         </class>
6302         <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">
6303                 <fields oils_persist:primary="id" oils_persist:sequence="">
6304                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6305                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6306                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6307                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6308                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6309                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6310                         <field reporter:label="Accepting User" name="accepting_usr" />
6311                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6312                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6313                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6314                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6315                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6316                 </fields>
6317                 <links>
6318                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6319                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6320                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6321                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6322                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6323                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6324                 </links>
6325         </class>
6326         <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">
6327                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6328                         <field name="bucket" reporter:datatype="link"/>
6329                         <field name="id" reporter:datatype="id" />
6330                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6331                         <field name="create_time" reporter:datatype="timestamp" />
6332                         <field name="pos" reporter:datatype="int" />
6333                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6334                 </fields>
6335                 <links>
6336                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6337                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6338             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6339                 </links>
6340         </class>
6341         <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">
6342                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6343                         <field name="id" reporter:datatype="id" />
6344                         <field name="item" reporter:datatype="link"/>
6345                         <field name="note" reporter:datatype="text" />
6346                 </fields>
6347                 <links>
6348                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6349                 </links>
6350         </class>
6351         <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">
6352                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6353                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6354                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6355                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6356                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6357                 </fields>
6358                 <links>
6359                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6360                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6361                 </links>
6362         </class>
6363     <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">
6364         <fields oils_persist:primary="field">
6365             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6366             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6367             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6368         </fields>
6369         <links/>
6370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6371             <actions>
6372                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6373                 <retrieve />
6374                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6375                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6376             </actions>
6377         </permacrud>
6378     </class>
6379         <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">
6380                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6381                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6382                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6383                 </fields>
6384                 <links/>
6385         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6386             <actions>
6387                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6388                 <retrieve/>
6389                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6390                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6391             </actions>
6392         </permacrud>
6393         </class>
6394
6395
6396         <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">
6397                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6398                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6399                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6400                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6401                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6402                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6403                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6404                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6405                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6406                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6407                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6408                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6409                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6410                 </fields>
6411                 <links>
6412                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6413                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6414                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6415                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6416                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6417                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6418                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6419                 </links>
6420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6421             <actions>
6422                 <create permission="TRANSIT_COPY">
6423                     <context link="target_copy" field="owner"/>
6424                 </create>
6425                 <retrieve/>
6426                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6427                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6428             </actions>
6429         </permacrud>
6430         </class>
6431         <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">
6432                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6433                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6434                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6435                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6436                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6437                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6438                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6439                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6440                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6441                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6442                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6443                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6444                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6445                 </fields>
6446                 <links>
6447                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6448                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6449                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6450                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6451                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6452                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6453                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6454                 </links>
6455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6456             <actions>
6457                 <create permission="TRANSIT_COPY" context_field="owner">
6458                     <context link="target_copy" field="circ_lib"/>
6459                 </create>
6460                 <retrieve/>
6461                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6462                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6463             </actions>
6464         </permacrud>
6465         </class>
6466         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6467                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6468                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6469                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6470                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6471                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6472                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6473                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6474                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6475                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6476                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6477                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6478                 </fields>
6479                 <links>
6480                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6481                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6482                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6483                 </links>
6484         </class>
6485         <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">
6486                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6487                         <field name="grp" />
6488                         <field name="id" reporter:datatype="id" />
6489                         <field name="usr" />
6490                 </fields>
6491                 <links>
6492                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6493                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6494                 </links>
6495         </class>
6496         <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">
6497                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6498                         <field name="id" reporter:datatype="id" />
6499                         <field name="fq_field" reporter:datatype="text"/>
6500                         <field name="identity_value" reporter:datatype="text"/>
6501                         <field name="translation" reporter:datatype="text"/>
6502                         <field name="string" reporter:datatype="text"/>
6503                 </fields>
6504                 <links>
6505                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6506                 </links>
6507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6508             <actions>
6509                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6510                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6511                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6512                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6513             </actions>
6514         </permacrud>
6515         </class>
6516         <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">
6517                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6518                         <field name="id" reporter:datatype="id" />
6519                         <field name="fm_class" reporter:datatype="text"/>
6520                         <field name="field" reporter:datatype="text"/>
6521                         <field name="owner" reporter:datatype="org_unit"/>
6522                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6523                 </fields>
6524                 <links>
6525                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6526                 </links>
6527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6528             <actions>
6529                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6530                 <retrieve/>
6531                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6532                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6533             </actions>
6534         </permacrud>
6535         </class>
6536         <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">
6537                 <fields oils_persist:primary="code">
6538                         <field name="code" reporter:datatype="id" />
6539                         <field name="marc_code" reporter:datatype="text"/>
6540                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6541                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6542                 </fields>
6543                 <links/>
6544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6545             <actions>
6546                 <create permission="CREATE_LOCALE" global_required="true"/>
6547                 <retrieve/>
6548                 <update permission="UPDATE_LOCALE" global_required="true"/>
6549                 <delete permission="DELETE_LOCALE" global_required="true"/>
6550             </actions>
6551         </permacrud>
6552         </class>
6553         <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">
6554                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6555                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6556                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6557                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6558             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6559                 </fields>
6560                 <links>
6561                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6562                 </links>
6563         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6564             <actions>
6565                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6566                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6567                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6568                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6569             </actions>
6570         </permacrud>
6571         </class>
6572
6573         <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">
6574                 <fields oils_persist:primary="id">
6575                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6576                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6577                 </fields>
6578                 <links/>
6579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6580             <actions>
6581                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6582                 <retrieve/>
6583                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6584                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6585             </actions>
6586         </permacrud>
6587         </class>
6588
6589         <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">
6590                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6591                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6592                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6593                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6594                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6595                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6596                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6597                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6598                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6599                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6600                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6601                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6602                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6603                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6604                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6605                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6606                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6607                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6608                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6609                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6610                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6611                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6612                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6613                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6614                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6615                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6616                 </fields>
6617                 <links>
6618                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6619                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6620                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6621                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6622                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6623                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6624                 </links>
6625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6626             <actions>
6627                 <create permission="user_request.create">
6628                     <context link="usr" field="home_ou"/>
6629                                 </create>
6630                 <retrieve permission="user_request.view">
6631                     <context link="usr" field="home_ou"/>
6632                                 </retrieve>
6633                 <update permission="user_request.update">
6634                     <context link="usr" field="home_ou"/>
6635                                 </update>
6636                 <delete permission="user_request.delete">
6637                     <context link="usr" field="home_ou"/>
6638                                 </delete>
6639             </actions>
6640         </permacrud>
6641         </class>
6642
6643         <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">
6644                 <fields oils_persist:primary="code">
6645                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6646                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6647                 </fields>
6648                 <links/>
6649         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6650             <actions>
6651                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6652                 <retrieve/>
6653                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6654                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6655             </actions>
6656         </permacrud>
6657         </class>
6658
6659         <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">
6660                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6661                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6662                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6663                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6664                         <field reporter:label="Ratio" name="ratio" />
6665                 </fields>
6666                 <links>
6667                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6668                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6669                 </links>
6670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6671                         <actions>
6672                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6673                                 <retrieve/>
6674                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6675                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6676                         </actions>
6677                 </permacrud>
6678         </class>
6679
6680         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6681                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6682                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6683                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6684                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6685                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6686                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6687                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6688                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6689                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6690                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6691                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6692                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6693                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6694                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6695                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6696                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6697                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6698                 </fields>
6699                 <links>
6700                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6701                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6702             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6703             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6704             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6705                 </links>
6706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6707             <actions>
6708                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6709                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6710                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6711                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6712             </actions>
6713         </permacrud>
6714         </class>
6715
6716         <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">
6717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6718                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6719                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6720                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6721                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6722                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6723                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6724                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6725                 </fields>
6726                 <links>
6727                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6728                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6729                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6730                 </links>
6731         </class>
6732
6733         <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">
6734                 <fields oils_persist:primary="code">
6735                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6736                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6737                 </fields>
6738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6739             <actions>
6740                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6741                 <retrieve/>
6742                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6743                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6744             </actions>
6745                 </permacrud>
6746         </class>
6747
6748         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6749                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6750                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6751                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6752                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6753                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6754                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6755                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6756                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6757                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6758                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6759                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6760                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6761                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6762                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6763                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6764                 </fields>
6765                 <links>
6766                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6767                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6768                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6769                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6770                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6771                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6772                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6773                 </links>
6774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6775             <actions>
6776                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6777                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6778                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6779                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6780             </actions>
6781         </permacrud>
6782         </class>
6783
6784         <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">
6785                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6786                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6787                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6788                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6789                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6790                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6791                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6792                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6793                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6794                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6795                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6796                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6797                 </fields>
6798                 <links>
6799                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6800                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6801                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6802                 </links>
6803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6804             <actions>
6805                 <create   permission="ADMIN_INVOICE">
6806                                         <context link="invoice" field="receiver"/>
6807                                 </create>
6808                 <retrieve permission="ADMIN_INVOICE">
6809                                         <context link="invoice" field="receiver"/>
6810                                 </retrieve>
6811                 <update   permission="ADMIN_INVOICE">
6812                                         <context link="invoice" field="receiver"/>
6813                                 </update>
6814                                 <delete   permission="ADMIN_INVOICE">
6815                                         <context link="invoice" field="receiver"/>
6816                                 </delete>
6817             </actions>
6818         </permacrud>
6819         </class>
6820
6821         <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">
6822                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6823                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6824                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6825                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6826                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6827                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6828                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6829                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6830                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6831                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6832                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6833                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6834                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6835                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6836                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6837                 </fields>
6838                 <links>
6839                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6840                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6841                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6842                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6843                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6844                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6845                 </links>
6846         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6847             <actions>
6848                 <create   permission="ADMIN_INVOICE">
6849                                         <context link="invoice" field="receiver"/>
6850                                 </create>
6851                 <retrieve permission="ADMIN_INVOICE">
6852                                         <context link="invoice" field="receiver"/>
6853                                 </retrieve>
6854                 <update   permission="ADMIN_INVOICE">
6855                                         <context link="invoice" field="receiver"/>
6856                                 </update>
6857                                 <delete   permission="ADMIN_INVOICE">
6858                                         <context link="invoice" field="receiver"/>
6859                                 </delete>
6860             </actions>
6861         </permacrud>
6862         </class>
6863
6864         <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">
6865                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6866                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6867                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6868                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6869                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6870                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6871                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6872                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6873                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6874                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6875                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6876                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6877                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6878                 </fields>
6879                 <links>
6880                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6881                 </links>
6882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6883             <actions>
6884                 <create permission="ADMIN_PROVIDER">
6885                     <context link="provider" field="owner"/>
6886                 </create>
6887                 <retrieve permission="ADMIN_PROVIDER">
6888                     <context link="provider" field="owner"/>
6889                 </retrieve>
6890                 <update permission="ADMIN_PROVIDER">
6891                     <context link="provider" field="owner"/>
6892                 </update>
6893                 <delete permission="ADMIN_PROVIDER">
6894                     <context link="provider" field="owner"/>
6895                 </delete>
6896             </actions>
6897         </permacrud>
6898         </class>
6899
6900         <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">
6901                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6902                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6903                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6904                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6905                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6906                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6907                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6908         </fields>
6909                 <links>
6910                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6911                 </links>
6912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6913             <actions>
6914                 <create permission="ADMIN_PROVIDER">
6915                     <context link="provider" field="owner"/>
6916                 </create>
6917                 <retrieve permission="ADMIN_PROVIDER">
6918                     <context link="provider" field="owner"/>
6919                 </retrieve>
6920                 <update permission="ADMIN_PROVIDER">
6921                     <context link="provider" field="owner"/>
6922                 </update>
6923                 <delete permission="ADMIN_PROVIDER">
6924                     <context link="provider" field="owner"/>
6925                 </delete>
6926             </actions>
6927         </permacrud>
6928     </class>
6929         <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">
6930                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6931                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6932                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6933                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6934                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6935                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6936                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6937                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6938                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6939                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6940                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6941                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6942                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6943                 </fields>
6944                 <links>
6945                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6946                 </links>
6947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6948             <actions>
6949                 <create permission="ADMIN_PROVIDER">
6950                     <context link="contact" jump='provider' field="owner"/>
6951                 </create>
6952                 <retrieve permission="ADMIN_PROVIDER">
6953                     <context link="contact" jump='provider' field="owner"/>
6954                 </retrieve>
6955                 <update permission="ADMIN_PROVIDER">
6956                     <context link="contact" jump='provider' field="owner"/>
6957                 </update>
6958                 <delete permission="ADMIN_PROVIDER">
6959                     <context link="contact" jump='provider' field="owner"/>
6960                 </delete>
6961             </actions>
6962         </permacrud>
6963         </class>
6964
6965         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6966                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6967                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6968                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6969                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6970                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6971                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6972                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6973                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6974                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6975                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6976                 </fields>
6977                 <links>
6978                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6979                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6980                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6981                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6982                 </links>
6983         </class>
6984
6985         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6986                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6987                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6988                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6989                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6990                 </fields>
6991                 <links>
6992             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6993                 </links>
6994                 <!--
6995                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6996                         But here's what it should look like if we ever do use pcrud.
6997                 -->
6998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6999                         <actions>
7000                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7001                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7002                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7003                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7004                         </actions>
7005                 </permacrud>
7006         </class>
7007
7008         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
7009                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7010                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7011                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7012                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7013                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7014                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7015                 </fields>
7016                 <links>
7017                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7018                 </links>
7019                 <!--
7020                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
7021                         But here's what it should look like if we ever do use pcrud.
7022                 -->
7023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7024                         <actions>
7025                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7026                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7027                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7028                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7029                         </actions>
7030                 </permacrud>
7031         </class>
7032
7033         <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">
7034                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7035                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7036                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7037                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7038                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7039                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7040                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7041                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7042                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7043                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7044                 </fields>
7045                 <links>
7046                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7047                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7048             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7049             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7050                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7051                 </links>
7052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7053             <actions>
7054                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7055                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7056                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7057                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7058             </actions>
7059         </permacrud>
7060         </class>
7061
7062         <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">
7063                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7064                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7065                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7066                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7067                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7068                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7069                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7070                 </fields>
7071                 <links>
7072                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7073                 </links>
7074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7075                         <actions>
7076                                 <create permission="ADMIN_FUNDING_SOURCE">
7077                     <context link="funding_source" field="owner"/>
7078                 </create>
7079                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7080                     <context link="funding_source" field="owner"/>
7081                 </retrieve>
7082                                 <update permission="ADMIN_FUNDING_SOURCE">
7083                     <context link="funding_source" field="owner"/>
7084                 </update>
7085                                 <delete permission="ADMIN_FUNDING_SOURCE">
7086                     <context link="funding_source" field="owner"/>
7087                 </delete>
7088                         </actions>
7089                 </permacrud>
7090         </class>
7091
7092         <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">
7093                 <fields oils_persist:primary="id">
7094                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7095                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7096                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7097                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7098                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7099                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7100                 </fields>
7101                 <links>
7102                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7103                 </links>
7104         </class>
7105
7106         <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">
7107                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7108                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7109                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7110                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7111                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7112                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7113                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7114                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7115                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7116                 </fields>
7117                 <links>
7118                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7119                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7120                 </links>
7121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7122                         <actions>
7123                                 <create permission="ADMIN_ACQ_FUND">
7124                     <context link="fund" field="org"/>
7125                 </create>
7126                                 <retrieve permission="ADMIN_ACQ_FUND">
7127                     <context link="fund" field="org"/>
7128                 </retrieve>
7129                                 <update permission="ADMIN_ACQ_FUND">
7130                     <context link="fund" field="org"/>
7131                 </update>
7132                                 <delete permission="ADMIN_ACQ_FUND">
7133                     <context link="fund" field="org"/>
7134                 </delete>
7135                         </actions>
7136                 </permacrud>
7137         </class>
7138
7139         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7141                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7142                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7143                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7144                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7145                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7146                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7147                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7148                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7149                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7150                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7151                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7152                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7153                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7154                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7155                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7156                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7157                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7158                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7159                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7160                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7161                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7162                 </fields>
7163                 <links>
7164                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7165                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7166             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7167             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7168             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7169             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7170             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7171             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7172             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7173             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7174             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7175                 </links>
7176         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7177             <actions>
7178                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7179                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7180                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7181                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7182             </actions>
7183         </permacrud>
7184         </class>
7185
7186         <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">
7187                 <fields oils_persist:primary="fund">
7188                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7189                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7190                 </fields>
7191                 <links>
7192                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7193                 </links>
7194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7195             <actions>
7196                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7197                                         <context link="fund" field="org" />
7198                 </retrieve>
7199             </actions>
7200         </permacrud>
7201         </class>
7202
7203         <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">
7204                 <fields oils_persist:primary="fund">
7205                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7206                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7207                 </fields>
7208                 <links>
7209                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7210                 </links>
7211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7212             <actions>
7213                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7214                                         <context link="fund" field="org" />
7215                 </retrieve>
7216             </actions>
7217         </permacrud>
7218         </class>
7219
7220         <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">
7221                 <fields oils_persist:primary="fund">
7222                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7223                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7224                 </fields>
7225                 <links>
7226                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7227                 </links>
7228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7229             <actions>
7230                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7231                                         <context link="fund" field="org" />
7232                 </retrieve>
7233             </actions>
7234         </permacrud>
7235         </class>
7236
7237         <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">
7238                 <fields oils_persist:primary="fund">
7239                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7240                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7241                 </fields>
7242                 <links>
7243                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7244                 </links>
7245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7246             <actions>
7247                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7248                                         <context link="fund" field="org" />
7249                 </retrieve>
7250             </actions>
7251         </permacrud>
7252         </class>
7253
7254         <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">
7255                 <fields oils_persist:primary="fund">
7256                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7257                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7258                 </fields>
7259                 <links>
7260                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7261                 </links>
7262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7263             <actions>
7264                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7265                                         <context link="fund" field="org" />
7266                 </retrieve>
7267             </actions>
7268         </permacrud>
7269         </class>
7270
7271    <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">
7272         <fields oils_persist:primary="fund">
7273             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7274             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7275         </fields>
7276         <links>
7277             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7278         </links>
7279     </class>
7280
7281    <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">
7282         <fields oils_persist:primary="fund">
7283             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7284             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7285         </fields>
7286         <links>
7287             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7288         </links>
7289     </class>
7290
7291    <class id="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">
7292         <fields oils_persist:primary="fund">
7293             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7294             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7295         </fields>
7296         <links>
7297             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7298         </links>
7299     </class>
7300
7301    <class id="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">
7302         <fields oils_persist:primary="fund">
7303             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7304             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7305         </fields>
7306         <links>
7307             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7308         </links>
7309     </class>
7310
7311    <class id="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">
7312         <fields oils_persist:primary="fund">
7313             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7314             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7315         </fields>
7316         <links>
7317             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7318         </links>
7319     </class>
7320
7321         <class id="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">
7322                 <fields oils_persist:primary="funding_source">
7323                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7324                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7325                 </fields>
7326                 <links>
7327                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7328                 </links>
7329         </class>
7330
7331         <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">
7332                 <fields oils_persist:primary="funding_source">
7333                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7334                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7335                 </fields>
7336                 <links>
7337                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7338                 </links>
7339         </class>
7340
7341         <class id="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">
7342                 <fields oils_persist:primary="funding_source">
7343                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7344                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7345                 </fields>
7346                 <links>
7347                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7348                 </links>
7349         </class>
7350
7351         <class id="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">
7352                 <fields oils_persist:primary="fund">
7353                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7354                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7355                 </fields>
7356                 <links>
7357                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7358                 </links>
7359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7360             <actions>
7361                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7362                                         <context link="fund" field="org" />
7363                 </retrieve>
7364             </actions>
7365         </permacrud>
7366     </class>
7367
7368         <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">
7369                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7370                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7371                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7372                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7373                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7374                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7375                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7376                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7377                 </fields>
7378                 <links>
7379                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7380                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7381                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7382                 </links>
7383                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7384                         <actions>
7385                                 <create permission="ADMIN_ACQ_FUND">
7386                     <context link="fund" field="org"/>
7387                 </create>
7388                                 <retrieve permission="ADMIN_ACQ_FUND">
7389                     <context link="fund" field="org"/>
7390                 </retrieve>
7391                                 <update permission="ADMIN_ACQ_FUND">
7392                     <context link="fund" field="org"/>
7393                 </update>
7394                                 <delete permission="ADMIN_ACQ_FUND">
7395                     <context link="fund" field="org"/>
7396                 </delete>
7397                         </actions>
7398                 </permacrud>
7399         </class>
7400
7401     <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">
7402         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7403             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7404             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7405             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7406             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7407             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7408             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7409             <field reporter:label="Note" name="note" reporter:datatype="text" />
7410             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7411         </fields>
7412         <links>
7413             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7414             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7415             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7416         </links>
7417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7418                         <actions>
7419                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7420                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7421                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7422                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7423                         </actions>
7424                 </permacrud>
7425     </class>
7426
7427         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7428                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7429                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7430                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7431                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7432                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7433                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7434                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7435                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7436                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7437                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7438                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7439                 </fields>
7440                 <links>
7441                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7442                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7443                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7444                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7445                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7446                 </links>
7447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7448                         <actions>
7449                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7450                         </actions>
7451                 </permacrud>
7452         </class>
7453
7454         <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">
7455                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7456                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7457                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7458                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7459                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7460                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7461                 </fields>
7462                 <links>
7463                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7464                 </links>
7465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7466                         <actions>
7467                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7468                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7469                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7470                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7471                         </actions>
7472                 </permacrud>
7473         </class>
7474
7475         <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">
7476                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7477                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7478                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7479                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7480                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7481                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7482                         <field reporter:label="State" name="state" reporter:datatype="text" />
7483                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7484                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7485                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7486                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7487                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7488                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7489                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7490                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7491                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7492                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7493                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7494                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7495                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7496                 </fields>
7497                 <links>
7498                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7499                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7500                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7501                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7502                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7503                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7504                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7505                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7506                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7507                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7508                 </links>
7509                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7510                         <actions>
7511                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7512                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7513                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7514                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7515                         </actions>
7516                 </permacrud>
7517         </class>
7518
7519         <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">
7520                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7521                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7522                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7523                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7524                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7525                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7526                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7527                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7528                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7529                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7530                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7531                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7532                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7533                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7534                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7535                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7536                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7537                 </fields>
7538                 <links>
7539                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7540                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7541                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7542                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7543                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7544                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7545                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7546                 </links>
7547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7548             <actions>
7549                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7550             </actions>
7551                 </permacrud>
7552         </class>
7553
7554         <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">
7555                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7556                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7557                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7558                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7559                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7560                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7561                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7562                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7563                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7564                 </fields>
7565                 <links>
7566                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7567                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7568                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7569                 </links>
7570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7571             <actions>
7572                 <create permission="CREATE_PURCHASE_ORDER">
7573                     <context link="purchase_order" field="ordering_agency"/>
7574                 </create>
7575                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7576                     <context link="purchase_order" field="ordering_agency"/>
7577                 </retrieve>
7578                 <update permission="CREATE_PURCHASE_ORDER">
7579                     <context link="purchase_order" field="ordering_agency"/>
7580                 </update>
7581                 <delete permission="CREATE_PURCHASE_ORDER">
7582                     <context link="purchase_order" field="ordering_agency"/>
7583                 </delete>
7584             </actions>
7585                 </permacrud>
7586         </class>
7587
7588         <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">
7589                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7590                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7591                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7592                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7593                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7594                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7595                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7596                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7597                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7598                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7599                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7600                 </fields>
7601                 <links>
7602                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7603                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7604                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7605                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7606                 </links>
7607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7608             <actions>
7609                 <create permission="CREATE_PURCHASE_ORDER">
7610                     <context link="purchase_order" field="ordering_agency"/>
7611                 </create>
7612                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7613                     <context link="purchase_order" field="ordering_agency"/>
7614                 </retrieve>
7615                 <update permission="CREATE_PURCHASE_ORDER">
7616                     <context link="purchase_order" field="ordering_agency"/>
7617                 </update>
7618                 <delete permission="CREATE_PURCHASE_ORDER">
7619                     <context link="purchase_order" field="ordering_agency"/>
7620                 </delete>
7621             </actions>
7622                 </permacrud>
7623         </class>
7624
7625         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7626                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7627                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7628                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7629                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7630                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7631                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7632                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7633                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7634                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7635                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7636                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7637                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7638                         <field reporter:label="State" name="state" reporter:datatype="text" />
7639                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7640                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7641                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7642                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7643                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7644                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7645                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7646                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7647                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7648                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7649                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7650                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7651                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7652                 </fields>
7653                 <links>
7654                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7655                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7656                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7657                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7658                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7659                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7660                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7661                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7662                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7663                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7664                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7665                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7666                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7667                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7668                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7669                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7670                 </links>
7671                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7672                         <actions>
7673                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7674                                         <context link="purchase_order" field="ordering_agency"/>
7675                                         <context link="picklist" field="org_unit"/>
7676                                 </retrieve>
7677                         </actions>
7678                 </permacrud>
7679         </class>
7680
7681         <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">
7682                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7683                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7684                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7685                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7686                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7687                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7688                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7689                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7690                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7691                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7692                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7693                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7694                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7695                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7696                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7697                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7698                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7699                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7700                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7701                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7702                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7703                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7704                 </fields>
7705                 <links>
7706                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7707                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7708                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7709                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7710                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7711                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7712                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7713                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7714                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7715                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7716                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7717                 </links>
7718                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7719                         <actions>
7720                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7721                                         <context link="purchase_order" field="ordering_agency"/>
7722                                         <context link="picklist" field="org_unit"/>
7723                                 </retrieve>
7724                         </actions>
7725                 </permacrud>
7726         </class>
7727
7728         <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">
7729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7730                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7731                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7732                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7733                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7734                 </fields>
7735                 <links>
7736                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7737                 </links>
7738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7739                         <actions>
7740                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7741                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7742                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7743                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7744                         </actions>
7745                 </permacrud>
7746         </class>
7747
7748         <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">
7749                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7750                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7751                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7752                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7753                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7754                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7755                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7756                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7757                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7758                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7759                 </fields>
7760                 <links>
7761                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7762                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7763                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7764                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7765                 </links>
7766         </class>
7767
7768         <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">
7769                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7770                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7771                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7772                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7773                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7774                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7775                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7776                 </fields>
7777                 <links>
7778                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7779                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7780                 </links>
7781         </class>
7782
7783         <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">
7784                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7785                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7786                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7787                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7788                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7789                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7790                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7791                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7792                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7793                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7794                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7795                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7796                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7797                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7798                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7799                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7800                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7801                 </fields>
7802                 <links>
7803                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7804                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7805                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7806                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7807                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7808                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7809                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7810                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7811                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7812                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7813                 </links>
7814         </class>
7815
7816         <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">
7817                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7818                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7819                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7820                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7821                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7822                 </fields>
7823                 <links/>
7824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7825                         <actions>
7826                                 <retrieve />
7827                         </actions>
7828                 </permacrud>
7829         </class>
7830
7831         <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">
7832                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7833                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7834                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7835                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7836                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7837                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7838             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7839                 </fields>
7840                 <links/>
7841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7842             <actions>
7843                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7844                 <retrieve />
7845                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7846                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7847             </actions>
7848         </permacrud>
7849         </class>
7850
7851         <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">
7852                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7853                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7854                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7855                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7856                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7857                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7858                 </fields>
7859                 <links/>
7860         </class>
7861         <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">
7862                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7863                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7864                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7865                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7866                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7867                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7868                 </fields>
7869                 <links>
7870                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7871                 </links>
7872         </class>
7873
7874         <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">
7875             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7876                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7877                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7878                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7879                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7880                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7881                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7882         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7883
7884             </fields>
7885             <links>
7886                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7887             </links>
7888             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7889                 <actions>
7890                     <create permission="ADMIN_PROVIDER">
7891                         <context link="provider" field="owner"/>
7892                     </create>
7893                     <retrieve permission="ADMIN_PROVIDER">
7894                         <context link="provider" field="owner"/>
7895                     </retrieve>
7896                     <update permission="ADMIN_PROVIDER">
7897                         <context link="provider" field="owner"/>
7898                     </update>
7899                     <delete permission="ADMIN_PROVIDER">
7900                         <context link="provider" field="owner"/>
7901                     </delete>
7902                 </actions>
7903             </permacrud>
7904         </class>
7905         
7906         <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">
7907             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7908                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7909                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7910                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7911                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7912             </fields>
7913             <links>
7914                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7915             </links>
7916             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7917                 <actions>
7918                     <create permission="ADMIN_PROVIDER">
7919                         <context link="provider" field="owner"/>
7920                     </create>
7921                     <retrieve permission="ADMIN_PROVIDER">
7922                         <context link="provider" field="owner"/>
7923                     </retrieve>
7924                     <update permission="ADMIN_PROVIDER">
7925                         <context link="provider" field="owner"/>
7926                     </update>
7927                     <delete permission="ADMIN_PROVIDER">
7928                         <context link="provider" field="owner"/>
7929                     </delete>
7930                 </actions>
7931             </permacrud>
7932         </class>
7933         
7934         <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">
7935             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7936                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7937                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7938                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7939                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7940                 </fields>
7941                 <links/>
7942         </class>
7943
7944         <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">
7945                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7946                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7947                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7948                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7949                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7950                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7951                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7952                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7953                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7954                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7955                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7956                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7957                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7958                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7959                 </fields>
7960                 <links>
7961                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7962                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7963                 </links>
7964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7965             <actions>
7966                 <create permission="ADMIN_PROVIDER">
7967                     <context link="provider" field="owner"/>
7968                 </create>
7969                 <retrieve permission="ADMIN_PROVIDER">
7970                     <context link="provider" field="owner"/>
7971                 </retrieve>
7972                 <update permission="ADMIN_PROVIDER">
7973                     <context link="provider" field="owner"/>
7974                 </update>
7975                 <delete permission="ADMIN_PROVIDER">
7976                     <context link="provider" field="owner"/>
7977                 </delete>
7978             </actions>
7979         </permacrud>
7980         </class>
7981
7982         <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">
7983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7984                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7985                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7986                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7987                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7988                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7989                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7990                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7991                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7992                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7993                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7994                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7995                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7996                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7997                 </fields>
7998                 <links>
7999                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8000                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8001                 </links>
8002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8003             <actions>
8004                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8005                     <context link="account" jump="provider" field="owner"/>
8006                 </retrieve>
8007                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8008                     <context link="account" jump="provider" field="owner"/>
8009                 </update>
8010                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8011                     <context link="account" jump="provider" field="owner"/>
8012                 </delete>
8013             </actions>
8014         </permacrud>
8015         </class>
8016
8017
8018         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8019                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8020                         <field name="id" reporter:datatype="id" />
8021                         <field name="parent" reporter:datatype="link"/>
8022                         <field name="owner" reporter:datatype="link"/>
8023                         <field name="create_time" reporter:datatype="timestamp"/>
8024                         <field name="name" reporter:datatype="text"/>
8025                         <field name="shared" reporter:datatype="bool"/>
8026                         <field name="share_with" reporter:datatype="link"/>
8027                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8028                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8029                 </fields>
8030                 <links>
8031                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8032                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8033                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8034                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8035                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8036                 </links>
8037         </class>
8038         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8039                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8040                         <field name="id" reporter:datatype="id" />
8041                         <field name="parent" reporter:datatype="link"/>
8042                         <field name="owner" reporter:datatype="link"/>
8043                         <field name="create_time" reporter:datatype="timestamp"/>
8044                         <field name="name" reporter:datatype="text"/>
8045                         <field name="shared" reporter:datatype="bool"/>
8046                         <field name="share_with" reporter:datatype="link"/>
8047                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8048                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8049                 </fields>
8050                 <links>
8051                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8052                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8053                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8054                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8055                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8056                 </links>
8057         </class>
8058         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8059                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8060                         <field name="id" reporter:datatype="id" />
8061                         <field name="parent" reporter:datatype="link"/>
8062                         <field name="owner" reporter:datatype="link"/>
8063                         <field name="create_time" reporter:datatype="timestamp"/>
8064                         <field name="name" reporter:datatype="text"/>
8065                         <field name="shared" reporter:datatype="bool"/>
8066                         <field name="share_with" reporter:datatype="link"/>
8067                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8068                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8069                 </fields>
8070                 <links>
8071                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8072                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8073                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8074                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8075                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8076                 </links>
8077         </class>
8078         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8079                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8080                         <field name="id" reporter:datatype="id" />
8081                         <field name="owner" reporter:datatype="link"/>
8082                         <field name="create_time" reporter:datatype="timestamp"/>
8083                         <field name="name" reporter:datatype="text"/>
8084                         <field name="data" reporter:datatype="text"/>
8085                         <field name="folder" reporter:datatype="link"/>
8086                         <field name="description" reporter:datatype="text"/>
8087                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8088                 </fields>
8089                 <links>
8090                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8091                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8092                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8093                 </links>
8094         </class>
8095         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8096                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8097                         <field name="id" reporter:datatype="id" />
8098                         <field name="owner" reporter:datatype="link"/>
8099                         <field name="create_time" reporter:datatype="timestamp"/>
8100                         <field name="template" reporter:datatype="link"/>
8101                         <field name="data" reporter:datatype="text"/>
8102                         <field name="folder" reporter:datatype="link"/>
8103                         <field name="recur" reporter:datatype="bool"/>
8104                         <field name="recurrence" reporter:datatype="interval"/>
8105                         <field name="name" reporter:datatype="text"/>
8106                         <field name="description" reporter:datatype="text"/>
8107                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8108                 </fields>
8109                 <links>
8110                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8111                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8112                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8113                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8114                 </links>
8115         </class>
8116         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8117                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8118                         <field name="id" reporter:datatype="id" />
8119                         <field name="runner" reporter:datatype="link"/>
8120                         <field name="start_time" reporter:datatype="timestamp"/>
8121                         <field name="complete_time" reporter:datatype="timestamp"/>
8122                         <field name="run_time" reporter:datatype="timestamp"/>
8123                         <field name="email" reporter:datatype="text"/>
8124                         <field name="excel_format" reporter:datatype="bool"/>
8125                         <field name="csv_format" reporter:datatype="bool"/>
8126                         <field name="html_format" reporter:datatype="bool"/>
8127                         <field name="error_code" reporter:datatype="int"/>
8128                         <field name="error_text" reporter:datatype="text"/>
8129                         <field name="report" reporter:datatype="link"/>
8130                         <field name="folder" reporter:datatype="link"/>
8131                         <field name="chart_pie" reporter:datatype="bool"/>
8132                         <field name="chart_bar" reporter:datatype="bool"/>
8133                         <field name="chart_line" reporter:datatype="bool"/>
8134                 </fields>
8135                 <links>
8136                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8137                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8138                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8139                 </links>
8140         </class>
8141         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
8142                 <fields oils_persist:primary="id">
8143                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8144                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8145                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8146                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8147                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8148                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8149                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8150                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8151                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8152                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8153                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8154                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8155                 </fields>
8156                 <links>
8157                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8158                 </links>
8159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8160                         <actions>
8161                                 <retrieve />
8162                         </actions>
8163                 </permacrud>
8164         </class>
8165         <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">
8166                 <fields oils_persist:primary="id">
8167                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8168                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8169                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8170                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8171                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8172                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8173                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8174                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8175                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8176                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8177                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8178                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8179                 </fields>
8180                 <links>
8181                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8182                 </links>
8183         </class>
8184         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8185                 <fields oils_persist:primary="id">
8186                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8187                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8188                         <field reporter:label="Fingerprint" name="fingerprint" />
8189                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8190                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8191                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8192                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8193                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8194                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8195                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8196                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8197                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8198                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8199                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8200                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8201                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8202                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8203                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8204                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8205                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8206                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8207                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8208                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8209                 </fields>
8210                 <links>
8211                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8212                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8213                 </links>
8214         </class>
8215         <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">
8216                 <fields oils_persist:primary="id">
8217                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8218                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8219                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8220                 </fields>
8221                 <links>
8222                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8223                 </links>
8224         </class>
8225         <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">
8226                 <fields oils_persist:primary="id">
8227                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8228                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8229                 </fields>
8230                 <links>
8231                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8232                 </links>
8233         </class>
8234         <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">
8235                 <fields oils_persist:primary="id">
8236                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8237                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8238                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8239                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8240                 </fields>
8241                 <links>
8242                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8243                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8244                 </links>
8245         </class>
8246         <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">
8247                 <fields oils_persist:primary="xact">
8248                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8249                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8250                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8251                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8252                 </fields>
8253                 <links>
8254                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8255                 </links>
8256         </class>
8257         <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">
8258                 <fields oils_persist:primary="xact">
8259                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8260                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8261                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8262                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8263                 </fields>
8264                 <links>
8265                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8266                 </links>
8267         </class>
8268         <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)">
8269                 <fields oils_persist:primary="id">
8270                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8271                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8272                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8273                 </fields>
8274                 <links>
8275                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8276                 </links>
8277         </class>
8278         <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">
8279                 <fields oils_persist:primary="id">
8280                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8281                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8282                 </fields>
8283                 <links>
8284                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8285                 </links>
8286         </class>
8287         <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">
8288                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8289                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
8290                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8291                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8292                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8293                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8294                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8295                 </fields>
8296                 <links>
8297                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8298                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8299                 </links>
8300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8301                         <actions>
8302                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8303                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8304                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8305                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8306                         </actions>
8307                 </permacrud>
8308         </class>
8309         <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">
8310                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8311                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8312                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8313                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8314                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8315                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8316                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8317                 </fields>
8318                 <links>
8319                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8320                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8321                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8322                 </links>
8323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8324                         <actions>
8325                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8326                                         <context link="formula" field="owner"/>
8327                                 </create>
8328                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8329                                         <context link="formula" field="owner"/>
8330                                 </retrieve>
8331                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8332                                         <context link="formula" field="owner"/>
8333                                 </update>
8334                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8335                                         <context link="formula" field="owner"/>
8336                                 </delete>
8337                         </actions>
8338                 </permacrud>
8339         </class>
8340
8341         <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">
8342                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8343                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8344                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8345                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8346                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8347                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8348                 </fields>
8349                 <links>
8350                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8351                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8352                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8353                 </links>
8354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8355                         <actions>
8356                                 <create permission="CREATE_PURCHASE_ORDER">
8357                                         <context link="formula" field="owner"/>
8358                 </create>
8359                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8360                                         <context link="formula" field="owner"/>
8361                 </retrieve>
8362                                 <update permission="CREATE_PURCHASE_ORDER">
8363                                         <context link="formula" field="owner"/>
8364                 </update>
8365                                 <delete permission="CREATE_PURCHASE_ORDER">
8366                                         <context link="formula" field="owner"/>
8367                 </delete>
8368                         </actions>
8369                 </permacrud>
8370         </class>
8371
8372         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8373                 <fields oils_persist:primary="id">
8374                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8375                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8376                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8377                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8378                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8379                 </fields>
8380                 <links>
8381                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8382                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8383                 </links>
8384         </class>
8385
8386         <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">
8387                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8388                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8389                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8390                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8391                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8392                 </fields>
8393                 <links>
8394                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8395                 </links>
8396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8397                         <actions>
8398                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8399                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8400                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8401                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8402                         </actions>
8403                 </permacrud>
8404         </class>
8405
8406         <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">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8408                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8409                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8410                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8411                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8412                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8413                 </fields>
8414                 <links>
8415                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8416                 </links>
8417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8418                         <actions>
8419                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8420                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8421                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8422                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8423                         </actions>
8424                 </permacrud>
8425         </class>
8426
8427         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8428                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8429                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8430                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8431                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8432                 </fields>
8433                 <links>
8434                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8435                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8436                 </links>
8437         </class>
8438
8439         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8440                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8441                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8442                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8443                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8444                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8445                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8446                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8447                 </fields>
8448                 <links>
8449                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8450                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8451                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8452                 </links>
8453         </class>
8454
8455         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8456                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8457                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8458                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8459                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8460                 </fields>
8461                 <links>
8462                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8463                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8464                 </links>
8465         </class>
8466
8467         <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">
8468                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8469                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8470                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8471                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8472                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8473                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8474                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8475                 </fields>
8476                 <links>
8477                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8478                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8479                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8480                 </links>
8481         </class>
8482
8483         <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">
8484                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8485                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8486                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8487                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8488                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8489                 </fields>
8490                 <links>
8491                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8492                 </links>
8493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8494             <actions>
8495                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8496                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8497                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8498                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8499             </actions>
8500                 </permacrud>
8501         </class>
8502
8503         <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">
8504                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8505                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8506                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8507                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8508                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8509                 </fields>
8510                 <links>
8511                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8512                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8513                 </links>
8514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8515                         <actions>
8516                                 <create permission="ADMIN_CLAIM_POLICY">
8517                                         <context link="claim_policy" field="org_unit"/>
8518                 </create>
8519                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8520                                         <context link="claim_policy" field="org_unit"/>
8521                 </retrieve>
8522                                 <update permission="ADMIN_CLAIM_POLICY">
8523                                         <context link="claim_policy" field="org_unit"/>
8524                 </update>
8525                                 <delete permission="ADMIN_CLAIM_POLICY">
8526                                         <context link="claim_policy" field="org_unit"/>
8527                 </delete>
8528                         </actions>
8529                 </permacrud>
8530         </class>
8531
8532     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8533         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8534             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8535             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8536             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8537             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8538             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8539             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8540             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8541             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8542             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8543             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8544             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8545             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8546             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8547             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8548             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8549         </fields>
8550     </class>
8551
8552     <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">
8553         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8554             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8555             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8556             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8557             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8558             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8559         </fields>
8560     </class>
8561
8562     <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">
8563         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8564             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8565             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8566             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8567             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8568             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8569             <field reporter:label="City" name="city" reporter:datatype="text"/>
8570             <field reporter:label="State" name="state" reporter:datatype="text"/>
8571             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8572             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8573             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8574         </fields>
8575     </class>
8576
8577     <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">
8578         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8579             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8580             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8581             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8582             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8583             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8584             <field reporter:label="City" name="city" reporter:datatype="text"/>
8585             <field reporter:label="State" name="state" reporter:datatype="text"/>
8586             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8587             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8588             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8589         </fields>
8590     </class>
8591
8592     <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">
8593         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8594             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8595             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8596             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8597             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8598             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8599             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8600         </fields>
8601     </class>
8602
8603         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8604                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8605                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8606                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8607                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8608                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8609                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8610                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8611                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8612                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8613                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8614                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8615                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8616                 </fields>
8617                 <links>
8618                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8619                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8620                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8621                 </links>
8622         </class>
8623
8624         <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">
8625                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8626                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8627                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8628                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8629                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8630                 </fields>
8631                 <links>
8632                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8633                 </links>
8634         </class>
8635
8636     <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">
8637         <fields>
8638             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8639             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8640             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8641         </fields>
8642                 <links>
8643                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8644                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8645                 </links>
8646     </class>
8647
8648     <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">
8649         <fields>
8650             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8651             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8652         </fields>
8653                 <links>
8654                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8655                 </links>
8656     </class>
8657
8658     <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">
8659         <fields>
8660             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8661             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8662             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8663         </fields>
8664                 <links>
8665                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8666                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8667                 </links>
8668     </class>
8669
8670     <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">
8671         <fields>
8672             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8673             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8674         </fields>
8675                 <links>
8676                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8677                 </links>
8678     </class>
8679
8680     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8681                 <oils_persist:source_definition>
8682
8683             SELECT  DISTINCT l.*
8684               FROM  action.unfulfilled_hold_loops l
8685                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8686               WHERE l.count = m.max
8687
8688                 </oils_persist:source_definition>
8689         <fields>
8690             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8691             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8692             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8693         </fields>
8694                 <links>
8695                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8696                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8697                 </links>
8698     </class>
8699
8700         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8701                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8702                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8703                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8704                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8705                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8706                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8707                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8708                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8709                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8710                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8711                 </fields>
8712                 <links>
8713                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8714                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8715                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8716                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8717                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8718                 </links>
8719         </class>
8720
8721         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8722                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8723                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8724                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8725                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8726                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8727                 </fields>
8728                 <links>
8729                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8730                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8731                 </links>
8732         </class>
8733
8734         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8735                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8736                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8737                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8738                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8739                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8740                 </fields>
8741                 <links>
8742                 </links>
8743         </class>
8744
8745         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8746                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8747                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8748                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8749                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8750                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8751                 </fields>
8752                 <links>
8753                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8754                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8755                 </links>
8756         </class>
8757         
8758         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8759                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8760                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8761                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8762                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8763                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8764                 </fields>
8765                 <links>
8766                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8767                 </links>
8768         </class>
8769         
8770         <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">
8771                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8772                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8773                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8774                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8775                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8776                 </fields>
8777                 <links>
8778                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8779                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8780                 </links>
8781         </class>
8782
8783         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8784                 <fields oils_persist:primary="name">
8785                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8786                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8787                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8788                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8789                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8790                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8791                 </fields>
8792                 <links>
8793                 </links>
8794         </class>
8795
8796         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8797                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8798                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8799                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8800                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8801                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8802                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8803                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8804                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8805                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8806                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8807                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8808                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8809                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8810                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8811                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8812                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8813                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8814                 </fields>
8815                 <links>
8816                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8817                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8818                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8819                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8820                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8821                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8822                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8823                 </links>
8824         </class>
8825
8826         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8827                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8828                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8829                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8830                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8831                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8832                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8833                 </fields>
8834                 <links>
8835                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8836                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8837                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8838                 </links>
8839         </class>
8840
8841         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8842                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8843                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8844                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8845                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8846                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8847                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8848                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8849                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8850                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8851                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8852                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8853                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8854                 </fields>
8855                 <links>
8856                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8857                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8858                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8859                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8860                 </links>
8861         </class>
8862
8863         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8864                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8865                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8866                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8867                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8868                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8869                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8870                 </fields>
8871                 <links>
8872                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8873                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8874                 </links>
8875         </class>
8876
8877         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8878                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8879                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8880                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8881                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8882                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8883                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8884                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8885                 </fields>
8886                 <links>
8887                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8888                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8889                 </links>
8890         </class>
8891
8892         <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">
8893                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8894                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8895                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8896                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8897                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8898                 </fields>
8899                 <links>
8900                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8901                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8902                 </links>
8903         </class>
8904
8905         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8906                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8907                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8908                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8909                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8910                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8911                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8912                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8913                 </fields>
8914                 <links>
8915                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8916                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8917                 </links>
8918         </class>
8919
8920         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8921                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8922                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8923                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8924                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8925                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8926                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8927                 </fields>
8928                 <links>
8929                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8930                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8931                 </links>
8932         </class>
8933
8934         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8935                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8936                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8937                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8938                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8939                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8940                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8941                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8942                 </fields>
8943                 <links>
8944                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8945                 </links>
8946         </class>
8947
8948         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8949                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8950                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8951                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8952                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8953                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8954                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8955                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8956                 </fields>
8957                 <links>
8958                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8959                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8960                 </links>
8961         </class>
8962
8963         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8964                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8965                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8966                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8967                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8968                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8969                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8970                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8971                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8972                 </fields>
8973                 <links>
8974                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8975                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8976                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8977                 </links>
8978         </class>
8979
8980         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8981                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8982                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8983                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8984                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8985                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8986                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8987                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8988                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8989                 </fields>
8990                 <links>
8991                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8992                 </links>
8993         </class>
8994
8995         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8996                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8997                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8998                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8999                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9000                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9001                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9002                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9003                 </fields>
9004                 <links>
9005                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9006                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9007                 </links>
9008         </class>
9009
9010         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9011                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9012                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9013                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9014                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9015                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9016                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9017                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9018                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9019                 </fields>
9020                 <links>
9021                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9022                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9023                 </links>
9024         </class>
9025
9026         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9027                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9028                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9029                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9030                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9031                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9032                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9033                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9034                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9035                 </fields>
9036                 <links>
9037                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9038                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9039                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9040                 </links>
9041         </class>
9042
9043         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9044                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9045                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9046                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9047                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9048                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9049                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9050                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9051                 </fields>
9052                 <links>
9053                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9054                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9055                 </links>
9056         </class>
9057
9058         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9059                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9060                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9061                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9062                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9063                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9064                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9065                 </fields>
9066                 <links>
9067                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9068                 </links>
9069         </class>
9070
9071         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9072                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9073                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9074                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9075                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9076                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9077                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9078                 </fields>
9079                 <links>
9080                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9081                 </links>
9082         </class>
9083
9084         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9085                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9086                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9087                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9088                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9089                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9090                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9091                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9092                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9093                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9094                 </fields>
9095                 <links>
9096                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9097                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9098                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9099                 </links>
9100         </class>
9101
9102         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9103                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9104                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9105                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9106                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9107                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9108                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9109                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9110                 </fields>
9111                 <links>
9112                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9113                 </links>
9114         </class>
9115
9116         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9117                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9118                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9119                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9120                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9121                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9122                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9123                 </fields>
9124                 <links>
9125                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9126                 </links>
9127         </class>
9128
9129         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9130                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9131                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9132                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9133                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9134                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9135                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9136                 </fields>
9137                 <links>
9138                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9139                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9140                 </links>
9141         </class>
9142
9143         <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">
9144                 <fields oils_persist:primary="id">
9145                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9146                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9147                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9148                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9149                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9150                 </fields>
9151                 <links>
9152                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9153                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9154                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9155                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9156                 </links>
9157         </class>
9158
9159         <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">
9160                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9161                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9162                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9163                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9164                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9165                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9166                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9167                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9168                 </fields>
9169                 <links/>
9170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9171                         <actions>
9172                                 <retrieve/>
9173                         </actions>
9174                 </permacrud>
9175         </class>
9176
9177         <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">
9178                 <fields oils_persist:primary="ptype_key">
9179                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9180                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9181                 </fields>
9182                 <links/>
9183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9184                         <actions>
9185                                 <retrieve/>
9186                         </actions>
9187                 </permacrud>
9188         </class>
9189
9190         <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">
9191                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9192                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9193                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9194                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9195                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9196                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9197                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9198                 </fields>
9199                 <links>
9200                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9201                 </links>
9202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9203                         <actions>
9204                                 <retrieve/>
9205                         </actions>
9206                 </permacrud>
9207         </class>
9208
9209         <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">
9210                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9211                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9212                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9213                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9214                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9215                 </fields>
9216                 <links>
9217                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9218                 </links>
9219                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9220                         <actions>
9221                                 <retrieve/>
9222                         </actions>
9223                 </permacrud>
9224         </class>
9225
9226         <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">
9227                 <fields oils_persist:primary="code">
9228                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9229                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9230                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9231                 </fields>
9232                 <links/>
9233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9234                         <actions>
9235                                 <retrieve/>
9236                         </actions>
9237                 </permacrud>
9238         </class>
9239
9240         <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">
9241                 <oils_persist:source_definition>
9242
9243             SELECT  b.id,
9244                     MAX(dcp.edit_date) AS last_delete_date
9245              FROM   biblio.record_entry b
9246                     JOIN asset.call_number cn ON (cn.record = b.id)
9247                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9248              WHERE  NOT b.deleted
9249              GROUP BY b.id
9250              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9251
9252                 </oils_persist:source_definition>
9253                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9254                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9255                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9256                 </fields>
9257                 <links>
9258                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9259                 </links>
9260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9261                         <actions>
9262                                 <retrieve/>
9263                         </actions>
9264                 </permacrud>
9265         </class>
9266
9267         <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">
9268                 <oils_persist:source_definition>
9269
9270             -- -- 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.
9271             -- -- 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
9272             -- -- may not.
9273             -- SELECT
9274             --     bre.id AS "bib_id",
9275             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9276             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9277             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9278             -- FROM (
9279                 SELECT
9280                     y.bre AS "id",
9281                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9282                     y.hold_count AS "hold_count",
9283                     (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"
9284                 FROM (
9285                         SELECT
9286                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9287                             COUNT(*) AS "hold_count"
9288                         FROM action.hold_request h
9289                         WHERE
9290                             cancel_time IS NULL
9291                             AND fulfillment_time IS NULL
9292                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9293                         GROUP BY 1
9294                     )y LEFT JOIN (
9295                         SELECT 
9296                             (SELECT id
9297                                 FROM biblio.record_entry 
9298                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9299                             ) AS "bre", 
9300                             COUNT(*) AS "copy_count"
9301                         FROM asset.copy
9302                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9303                         WHERE copy.holdable 
9304                             AND NOT copy.deleted 
9305                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9306                         GROUP BY 1
9307                     )x ON x.bre = y.bre
9308                 -- )z RIGHT JOIN (
9309                 --     SELECT id
9310                 --     FROM biblio.record_entry
9311                 --     WHERE NOT deleted
9312                 -- )bre ON (z.bib_id = bre.id)
9313                 
9314
9315                 </oils_persist:source_definition>
9316                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9317                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9318                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9319                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9320                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9321                 </fields>
9322                 <links>
9323                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9324                 </links>
9325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9326                         <actions>
9327                                 <retrieve/>
9328                         </actions>
9329                 </permacrud>
9330         </class>
9331
9332         <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">
9333                 <oils_persist:source_definition>
9334             SELECT *,
9335                 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,
9336                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9337             FROM
9338                 (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
9339                     FROM
9340                         action.hold_request ahr
9341                         JOIN reporter.hold_request_record rhrr USING (id)
9342                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9343                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9344                     WHERE
9345                         ahr.cancel_time IS NULL
9346                         AND ahr.fulfillment_time IS NULL
9347                     GROUP BY bib_record, pickup_lib
9348                 )x
9349                 JOIN
9350                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9351                     FROM
9352                         action.hold_request ahr
9353                         JOIN reporter.hold_request_record rhrr USING (id)
9354                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9355                     WHERE
9356                         ahr.cancel_time IS NULL
9357                         AND ahr.fulfillment_time IS NULL
9358                     GROUP BY bib_record
9359                 )y
9360                 USING (id)
9361                 </oils_persist:source_definition>
9362                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9363                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9364                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9365                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9366                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9367                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9368                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9369                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9370                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9371                 </fields>
9372                 <links>
9373                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9374                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9375                 </links>
9376                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9377                         <actions>
9378                                 <retrieve/>
9379                         </actions>
9380                 </permacrud>
9381         </class>
9382
9383         <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">
9384                 <oils_persist:source_definition>
9385             SELECT
9386                 ac.id,
9387                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9388                 MAX(actac.xact_start) AS last_circ
9389             FROM asset.copy ac
9390                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9391             GROUP BY ac.id
9392
9393             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9394             --SELECT
9395             --    ac.id,
9396             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9397             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9398             --FROM asset.copy ac
9399             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9400             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9401             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9402                 </oils_persist:source_definition>
9403                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9404                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9405                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9406                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9407                 </fields>
9408                 <links>
9409                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9410                 </links>
9411                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9412                         <actions>
9413                                 <retrieve/>
9414                         </actions>
9415                 </permacrud>
9416         </class>
9417
9418         <!-- ********************************************************************************************************************* -->
9419         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9420         <!-- ********************************************************************************************************************* -->
9421         <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">
9422                 <fields oils_persist:primary="id">
9423                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9424                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9425                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9426                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9427                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9428                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9429                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9430                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9431                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9432                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9433                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9434                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9435                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9436                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9437                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9438                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9439                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9440                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9441                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9442                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9443                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9444                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9445                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9446                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9447                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9448                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9449                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9450                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9451                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9452                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9453                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9454                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9455                 </fields>
9456                 <links>
9457                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9458                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9459                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9460                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9461                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9462                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9463                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9464                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9465                 </links>
9466         </class>
9467
9468         <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">
9469                 <fields oils_persist:primary="id">
9470                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9471                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9472                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9473                 </fields>
9474                 <links>
9475                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9476                 </links>
9477         </class>
9478
9479         <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">
9480                 <fields oils_persist:primary="id">
9481                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9482                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9483                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9484                 </fields>
9485                 <links>
9486                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9487                 </links>
9488         </class>
9489
9490         <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">
9491                 <fields oils_persist:primary="id">
9492                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9493
9494                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9495                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9496                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9497
9498                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9499                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9500                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9501
9502                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9503                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9504
9505                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9506                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9507                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9508
9509                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9510                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9511
9512                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9513                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9514                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9515
9516                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9517                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9518                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9519
9520                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9521                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9522                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9523                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9524
9525                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9526                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9527
9528                 </fields>
9529                 <links>
9530                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9531                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9532                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9533                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9534                 </links>
9535         </class>
9536
9537         <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">
9538                 <oils_persist:source_definition>
9539
9540             SELECT
9541                 po.ordering_agency AS ordering_agency,
9542                 po.id AS purchase_order,
9543                 li.id AS lineitem,
9544                 lid.id AS lineitem_detail,
9545                 cpa.id AS claim_policy_action
9546             FROM
9547                 acq.lineitem_detail lid
9548                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9549                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9550                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9551                 JOIN acq.claim_policy_action cpa ON (
9552                     cpa.claim_policy = cp.id
9553
9554                     -- we only care about claim policy actions whose claim
9555                     -- interval we'd reached or exceeded
9556                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9557
9558                     -- filter out all claim policy actions where claim events
9559                     -- have occurred on or after the action's action_interval
9560                     AND NOT EXISTS (
9561                         SELECT 1
9562                         FROM
9563                             acq.claim_event evt
9564                             JOIN acq.claim claim ON (
9565                                 claim.id = evt.claim
9566                                 AND claim.lineitem_detail = lid.id
9567                             )
9568                         WHERE
9569                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9570                     )
9571                 )
9572             WHERE
9573                 lid.cancel_reason IS NULL
9574                 AND li.cancel_reason IS NULL -- belt/suspenders
9575                 AND po.cancel_reason IS NULL -- belt/suspenders
9576                 AND lid.recv_time IS NULL
9577                 AND po.state = 'on-order'
9578             ORDER BY 1, 2, 3, 4, 5
9579
9580                 </oils_persist:source_definition>
9581                 <fields>
9582                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9583                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9584                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9585                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9586                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9587                 </fields>
9588                 <links>
9589                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9590                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9591                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9592                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9593                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9594                 </links>
9595         </class>
9596
9597         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9598                 <oils_persist:source_definition>
9599
9600             SELECT 
9601                 li.id AS lineitem, 
9602                 (
9603                     SELECT COUNT(lid.id) 
9604                     FROM acq.lineitem_detail lid
9605                     WHERE lineitem = li.id
9606                 ) AS item_count,
9607                 (
9608                     SELECT COUNT(lid.id) 
9609                     FROM acq.lineitem_detail lid
9610                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9611                 ) AS recv_count,
9612                 (
9613                     SELECT COUNT(lid.id) 
9614                     FROM acq.lineitem_detail lid
9615                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9616                 ) AS cancel_count,
9617                 (
9618                     SELECT COUNT(lid.id) 
9619                     FROM acq.lineitem_detail lid
9620                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9621                     WHERE NOT debit.encumbrance AND lineitem = li.id
9622                 ) AS invoice_count,
9623                 (
9624                     SELECT COUNT(DISTINCT(lid.id)) 
9625                     FROM acq.lineitem_detail lid
9626                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9627                     WHERE lineitem = li.id
9628                 ) AS claim_count,
9629                 (
9630                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9631                     FROM acq.lineitem_detail lid
9632                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9633                 ) AS estimated_amount,
9634                 (
9635                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9636                     FROM acq.lineitem_detail lid
9637                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9638                     WHERE debit.encumbrance AND lineitem = li.id
9639                 ) AS encumbrance_amount,
9640                 (
9641                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9642                     FROM acq.lineitem_detail lid
9643                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9644                     WHERE NOT debit.encumbrance AND lineitem = li.id
9645                 ) AS paid_amount
9646
9647                 FROM acq.lineitem AS li
9648         </oils_persist:source_definition>
9649                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9650                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9651                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9652                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9653                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9654                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9655                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9656                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9657                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9658                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9659                 </fields>
9660                 <links>
9661                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9662                 </links>
9663     </class>
9664
9665
9666         <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">
9667                 <oils_persist:source_definition>
9668
9669                         SELECT  t.*
9670                           FROM  action.transit_copy t
9671                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9672                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9673                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9674
9675                 </oils_persist:source_definition>
9676                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9677                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9678                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9679                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9680                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9681                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9682                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9683                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9684                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9685                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9686                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9687                 </fields>
9688                 <links>
9689                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9690                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9691                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9692                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9693                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9694                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9695                 </links>
9696         </class>
9697
9698     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9699                 <oils_persist:source_definition>
9700
9701         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9702                 SELECT
9703                         cp.id as copy,
9704                         COUNT(circ.id),
9705                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9706                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9707                 FROM
9708                         asset.copy cp
9709                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9710                 GROUP BY 1, 3, 4
9711                 UNION
9712                 SELECT
9713                         cp.id as copy,
9714                         COUNT(circ.id),
9715                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9716                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9717                 FROM
9718                         asset.copy cp
9719                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9720                 GROUP BY 1, 3, 4
9721                 UNION
9722                 SELECT
9723                         id as copy,
9724                         circ_count,
9725                         -1 AS year,
9726                         false as is_renewal
9727                 FROM
9728                         extend_reporter.legacy_circ_count
9729         )x GROUP BY 1, 3, 4
9730
9731                 </oils_persist:source_definition>
9732         <fields>
9733             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9734             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9735             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9736             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9737         </fields>
9738                 <links>
9739                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9740                 </links>
9741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9742                         <actions>
9743                                 <retrieve/>
9744                         </actions>
9745                 </permacrud>
9746     </class>
9747
9748         <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">
9749                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9750                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9751                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9752                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9753                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9754                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9755                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9756                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9757                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9758                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9759                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9760                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9761                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9762                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9763                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9764                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9765                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9766                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9767                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9768                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9769                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9770                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9771                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9772                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9773                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9774                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9775                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9776                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9777                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9778                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9779                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9780                 </fields>
9781                 <links>
9782                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9783                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9784                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9785                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9786                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9787                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9788                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9789                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9790                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9791                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9792                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9793                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9794                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9795                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9796                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9797                 </links>
9798         </class>
9799
9800     <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">
9801         <fields oils_persist:primary="id">
9802             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9803             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9804             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9805             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9806             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9807             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9808             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9809             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9810             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9811             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9812             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9813             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9814             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9815             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9816             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9817             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9818             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9819             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9820             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9821             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9822             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9823             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9824             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9825             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9826             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9827             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9828             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9829             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9830             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9831             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9832             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9833             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9834             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9835             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9836         </fields>
9837         <links>
9838             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9839             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9840             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9841             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9842             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9843         </links>
9844     </class>
9845
9846     <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">
9847         <fields oils_persist:primary="id">
9848             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9849             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9850             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9851             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9852         </fields>
9853         <links>
9854             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9855             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9856         </links>
9857     </class>
9858
9859     <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">
9860         <fields oils_persist:primary="owning_lib">
9861             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9862             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9863             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9864         </fields>
9865         <links>
9866             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9867         </links>
9868     </class>
9869
9870     <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">
9871         <fields oils_persist:primary="id">
9872             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9873             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9874             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9875             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9876             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9877         </fields>
9878         <links>
9879             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9880             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9881             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9882         </links>
9883     </class>
9884
9885     <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">
9886         <fields oils_persist:primary="circ_lib">
9887             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9888             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9889             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9890             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9891         </fields>
9892         <links>
9893             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9894             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9895         </links>
9896     </class>
9897
9898     <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">
9899         <fields oils_persist:primary="id">
9900             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9901             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9902             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9903             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9904             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9905         </fields>
9906         <links>
9907             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9908             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9909             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9910         </links>
9911     </class>
9912
9913     <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">
9914         <fields oils_persist:primary="home_ou">
9915             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9916             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9917             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9918             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9919         </fields>
9920         <links>
9921             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9922             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9923         </links>
9924     </class>
9925         <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">
9926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9927                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9928                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9929                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9930                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9931                 </fields>
9932                 <links>
9933                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9934                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9935                 </links>
9936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9937                         <actions>
9938                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9939                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9940                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9941                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9942                         </actions>
9943                 </permacrud>
9944         </class>
9945         <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">
9946                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9947                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9948                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9949                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9950                 </fields>
9951                 <links>
9952                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9953                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9954                         </links>
9955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9956                 <actions>
9957                                 <create permission="ADMIN_ACQ_FUND_TAG">
9958                                         <context link="tag" field="owner"/>
9959                                 </create>
9960                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9961                                         <context link="tag" field="owner"/>
9962                                 </retrieve>
9963                                 <update permission="ADMIN_ACQ_FUND_TAG">
9964                                         <context link="tag" field="owner"/>
9965                                 </update>
9966                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9967                                         <context link="tag" field="owner"/>
9968                                 </delete>
9969                         </actions>
9970                 </permacrud>
9971         </class>
9972         <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">
9973                 <oils_persist:source_definition><![CDATA[
9974                 SELECT
9975                         poi.purchase_order AS purchase_order,
9976                         ii.invoice AS invoice,
9977                         NULL AS lineitem,
9978                         poi.id AS po_item,
9979                         NULL AS picklist
9980                 FROM
9981                         acq.po_item poi
9982                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
9983                 UNION SELECT
9984                         jub.purchase_order AS purchase_order,
9985                         ie.invoice AS invoice,
9986                         jub.id AS lineitem,
9987                         NULL AS po_item,
9988                         jub.picklist AS picklist
9989                 FROM
9990                         acq.lineitem jub
9991                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
9992                 UNION SELECT
9993                         ii.purchase_order AS purchase_order,
9994                         ii.invoice AS invoice,
9995                         NULL AS lineitem,
9996                         NULL AS po_item,
9997                         NULL AS picklist
9998                 FROM
9999                         acq.invoice_item ii
10000                 WHERE ii.po_item IS NULL
10001                 UNION SELECT
10002                         ie.purchase_order AS purchase_order,
10003                         ie.invoice AS invoice,
10004                         NULL AS lineitem,
10005                         NULL AS po_item,
10006                         NULL AS picklist
10007                 FROM
10008                         acq.invoice_entry ie
10009                 WHERE ie.lineitem IS NULL
10010                 UNION SELECT
10011                         NULL AS purchase_order,
10012                         NULL AS invoice,
10013                         jub.id AS lineitem,
10014                         NULL AS po_item,
10015                         jub.picklist AS picklist
10016                 FROM
10017                         acq.lineitem jub
10018                 WHERE jub.purchase_order IS NULL
10019                 ]]></oils_persist:source_definition>
10020                 <fields>
10021                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10022                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10023                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10024                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10025                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10026                 </fields>
10027                 <links>
10028                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10029                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10030                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10031                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10032                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10033                 </links>
10034         </class>
10035         <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">
10036                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10037                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10038                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10039                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10040                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10041                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10042                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10043                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10044                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10045                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10046                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10047                 </fields>
10048                 <links>
10049                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10050                 </links>
10051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10052                         <actions>
10053                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10054                                 <retrieve/>
10055                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10056                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10057                         </actions>
10058                 </permacrud>
10059         </class>
10060
10061         <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">
10062                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10063                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10064                         <field name="date_applied" reporter:datatype="timestamp"/>
10065                         <field name="org" reporter:datatype="org_unit"/>
10066                         <field name="original_value" reporter:datatype="text"/>
10067                         <field name="new_value" reporter:datatype="text"/>
10068                         <field name="field_name" reporter:datatype="link"/>
10069                 </fields>
10070                 <links>
10071                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10072                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10073                 </links>
10074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10075                         <actions>
10076                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10077                                 <retrieve/>
10078                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10079                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10080                         </actions>
10081                 </permacrud>
10082         </class>
10083         <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">
10084                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10085                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10086                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10087                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10088                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10089                 </fields>
10090                 <links>
10091                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10092                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10093                 </links>
10094         </class>
10095         <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">
10096                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10097                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10098                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10099                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10100                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10101                 </fields>
10102                 <links>
10103                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10104                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10105                 </links>
10106         </class>
10107
10108
10109         <!-- ********************************************************************************************************************* -->
10110
10111 </IDL>
10112
10113 <!--
10114     vim:noet:ts=4:sw=4:
10115 -->